Refactored code to reference the mentioned labels by a general ID #7987
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #7533
What changes did you make?
retrieveLabelDirectory()
function fromretrieve-label-directory.js
that fetches the label value, also called labelName (thinking in terms of key-value pair).label-directory.json
usingretrieveLabelDirectory()
postComment()
to use the constant variable created aboveWhy did you make the changes (we will use this info to test)?
retrieve-label-directory.js
module to look up the corresponding 'labelName' inlabel-directory.json
instead of hard-coding the labelNames.role: front end
,role: back end/devOps
,role: design
androle: user research
so the constant variable created addresses this labels in particular.CodeQL Alerts
After the PR has been submitted and the resulting GitHub actions/checks have been completed, developers should check the PR for CodeQL alert annotations.
Check the PR's comments. If present on your PR, the CodeQL alert looks similar as shown
Please let us know that you have checked for CodeQL alerts. Please do not dismiss alerts.
Instructions for resolving CodeQL alerts
If CodeQL alert/annotations appear, refer to How to Resolve CodeQL alerts.
In general, CodeQL alerts should be resolved prior to PR reviews and merging
Screenshots of Proposed Changes To The Website (if any, please do not include screenshots of code changes)
To reviewers
console.log()
to help you understand why the changes were performed that way and to see that the code works as intended.label-directory.json
, this is fetched correctly. You must watch the raw logs of GHA for this, here goes a screenshot asretrieveLabelDirectory()
logs this.Here are the screenshots
To see the raw logs open the Actions tab, and look for this
Here's the raw log of the last issue created that shows that the value from the directory is fetched correctly more clearly (as "front end" is now "front end GHA ACTIONS FETCHED CORRECTLY USING labelKey")