-
-
Notifications
You must be signed in to change notification settings - Fork 843
Create new GHA to add comments to Skills Issue in re: event activities #8248
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
Create new GHA to add comments to Skills Issue in re: event activities #8248
Conversation
|
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. |
For issue closed, record both closer and the issue assignee with event
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 helping me with testing.
Looks like it's all working well.
Nice one, I approve! 🎉
add back changed file, then re-delete
| state: skillsIssueState, | ||
| }); | ||
| } catch (err) { | ||
| console.error(`Failed to update issue #${skillsIssueNum} state:`, err) |
Check notice
Code scanning / CodeQL
Semicolon insertion Note
the enclosing function
re-delete (fixing merge conflict)
fixed ===
Fixes #4820
What changes did you make?
activity-history-post.yml.activity-trigger.ymlactivity-trigger.jspost-to-skills-issue.jsadd-label.jsquery-issue-info.jsquery-skills-issue.jsWhy did you make the changes (we will use this info to test)?
activity-history-post.ymlwas a temporary, one-use file that should have been deleted previouslyactivity-trigger.ymlis the trigger file for the "Member Activity Trigger" workflow. Triggers are anytime an issue isopened,closed,reopened,assignedorunassigned; or if an issue comment iscreated; or if a PR isopened,closed, orreopened, or a PR review issubmitted; or a PR review comment iscreated.activity-trigger.jsdetermines who is theeventActorfor the event, categorizes the eventaction, pulls the correct eventurl, pulls thecreatedAttime and converts this intolocalTimeso it is readable, then composes the message that will be added to the dev's skills issue.activity-trigger.jsalso checks whether the comment, assignment, etc. was performed on a Skills Issue. If so, the event is ignored so that there is not a comment about a comment.post-to-skills-issue.jsfinds theeventActor/usernames Skills Issue if available, then extracts all comments to find the one that has theMARKERtext or create a new comment if needed, then checks whether theusernameis an Active Member, and if so confirms that their Skills Issue is open and that the issue's status is "In progress (actively working)".add-labels.jsis edited so that "Schedule Friday" checks for the new labelSkills Issue Completedand excludes those issues from the update checks. It also intercepts the bot from closing the "Activity Record" comment.query-skills-issue.jssearches repo for the issues with anassignees name and theComplexity: PreworklabelUPDATE 8/18/25: Additional edits from weekly lead meeting:
activity-trigger.ymladded for loop to give the workflow the ability to record to two locations for some singular events: "issue.closed" and "pull_request.closed", will now record the username of the issue assignee/ pr author, as well as the actor (usually Merge Team) who actually merged or closed the issue or pr, if differentactivity-trigger.jsadded logic for the abovepost-to-skills-issue.jsedited the Activity Log title to include the repo nameCodeQL 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)
Notes to reviewers
If you are already set up for GHAs, that is have a local Project Board, know about the tokens and labels, etc.:
The only changes for testing:
HACKFORLA_GRAPHQL_TOKENis activet-will-gillis-gha-add-comments-skills-issue-4820activity.trigger.ymlto refer to your own repo.github-actions/utils/_data/status-field-ids.js, so you will need to either tell the bot the number of your repo's Skills Issue:- Change lines 39-44 in
const skillsIssueNum = ;post-to-skills-issue.jsto:const skillsIssueNodeId = null;
const skillsStatusId = null;
```
Conversely, you could change the values in
github-actions/utils/_data/status-field-ids.jsto match your repo's values using GitHub Explorer (at least until Nov 1, 2025) but that is a lot more involved. Here is how to find that info:Extracting Status Field Ids from personal repo
Finding your projNum
Example output from Explorer
After, you should be able to quickly test that a message is being posted to your temporary Skills Issue whenever you open, close, assign, and unassign issues, add a comment, and open and close PRs.