-
-
Notifications
You must be signed in to change notification settings - Fork 785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor "Issue Trigger" for issue created from "Inactive Members" #7132
Refactor "Issue Trigger" for issue created from "Inactive Members" #7132
Conversation
authorize workflow for 'project' scope with GRAPHQL token
add GraphQL query for issue and status field ids then mutate, also add explicit semi-colons (to avoid CodeQL) and standardize spaces
capitalize GitHub
primarily added line so if title of issue matches "Hack for LA Website Bot...", skip posting comment (not needed)
adding explicit semi-colons
adding status field id numbers
fix mapping values
Want to review this pull request? Take a look at this documentation for a step by step guide! From your project repository, check out a new branch and test the changes.
|
Remove correlation of statusValues with actual names
revert to original
Adding reference key with actual status names
corrected function comments
added ref link to octokit rest api
Availability: Sat - Mon 6 PM - 10 PM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @t-will-gillis, thanks for working on this issue and making this clear description of what you have done!
I created a couple of issues and everything worked perfectly for me. Issues including the title "Hack for LA Website Bot" automatically added the required labels, and other issues with missing labels triggered a comment asking to add the missing labels.
I just have a question regarding line 40 in check-labels.js
:
mutateIssueStatus(github, context, itemId, newStatusValue);
Dones't this function need await
before it since it's async? I know it works which's surprising but just want to mentioned that. Otherwise, everything looks perfect for me.
Added 'await' to call to `mutateIssueStatus` Refactor line 38, refactor some console.log()
revert console.log() two locations
Thanks @moazDev1! I added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @t-will-gillis, everything looks perfect for me.
Keep going!
Thank you for reviewing this, @moazDev1! |
Fixes #7075
What changes did you make?
issue-trigger.yml
, addedHACKFORLA_GRAPHQL_TOKEN
check-labels.js
, added code lines 37-40 to retrieve issue and status field id values, then change issue's status to "Questions / In Review"post-labels-comment.js
, added check at line 38 so that if issue title matches "Hack for LA website bot..." the function returns without adding a comment.status-field-ids.js
mutate-issue-status.js
(thank you @moazDev1 )query-issue-info.js
(same!)Why did you make the changes (we will use this info to test)?
Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)
Notes for Testing
In order to review this PR you will need to have your repo environment set up for testing.
See Hack for LA's GitHub Actions (revised doc). This document should be mostly up to date still, but if you run into problems let us know
To find your own id values to use while testing:
and in the 'Variables' section underneath, replace for your GitHub login and project number:
Complexity: Small
,Feature: Administrative
,ready for dev leads
,role: dev leads
, andsize: 0.25pt
. Additionally, the issue will be moved to the status of "Questions / In Review"Successful run of "Issue Trigger"
Issue created Yours will not look exactly like this...