-
-
Notifications
You must be signed in to change notification settings - Fork 778
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
created a GHA to list inactive members of website-write team #4545
created a GHA to list inactive members of website-write team #4545
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.
|
Review ETA: 4/20 EOD |
Availability: Weekdays before 5pm |
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.
@mattmalane First of all, thanks for the thorough documentation of what you worked on. It made the review process much easier.
When I started testing the github actions in my own repo, the blank "id:" on line 39 of the schedule-monthly.yml workflow file was preventing the workflow from running. Once I filled that in though, the actions ran as intended and created the new issue with the list of inactive members, added it to the project board, and linked it in a comment on the issue I designated for testing purposes. Nice job.
Also, I noticed that a "bug" label was added to the issue in addition to the ones requested in the issue which looks to be caused by line 36 in create-new-issue.js. Was that intentional?
Once these two small things are addressed, this should be good to merge from what I can see.
And great work on getting all the main functions of the github actions worked out by the way.
@bootcamp-brian Hi Brian, thanks for you review! I updated this PR with the requested changes.
|
Updated review ETA: 4/26 12pm |
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.
@mattmalane Great job on this issue. It ran and worked on my forked repo. The idea to change the schedule to the first of every month instead of the last of every month was really smart.
My best guess is maybe it was leftover from some copying/pasting lol. |
@mattmalane Thanks for making the changes I requested. I did notice one more odd thing after Chris mentioned something to me. The first username on the list that gets generated, "cnk", doesn't seem to show up in the website-write team for some reason. All the other usernames I've tried show up when I search for them though. I'm not entirely sure why this is happening to be honest. This doesn't feel too important but probably a good idea to double check with the person who made the issue if anything needs to be done about this. And again, great work on this issue so far. |
@chrismenke45 Thanks for looking this over! I appreciate it. |
@bootcamp-brian I took a look at the website write list team in the Github GUI and it looks like there are child teams of website-write. Not sure the the importance of them yet, but the name |
Oh that makes sense. Thanks for clearing that up for me. In that case, your gha works great and should do exactly what the issue requested. Great work! |
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.
@mattmalane I just noticed that the PR is actually failing one of the checks. When I asked around about it, it was suggested to try changing the actions/checkout@v2
to actions/checkout@v3
because it might be a deprecation thing. Could you try that and see if it fixes the issue?
That's actually a thing that would be change in hfla's gha. |
Okay, so the check failure is being caused by a problem with the existing gha and not something to do with what Matthew worked on? |
@mattmalane So we managed to resolve the check failure. It wasn't caused by any of your code. I did, however, notice while going through your code again that you have trailing semicolons on some of your JavaScript code and not others where you would think there would be. Could you do a quick once over through your code and clean it up? Always good to get in the habit of keeping your code looking nice and consistent. |
Awesome! Thanks for getting that resolved. I'll give the code a look over and polish it up right now. |
@bootcamp-brian I added trailing semicolons throughout, should be good to go! |
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.
Looks good! I'll go ahead and merge this now. Thanks for working with us on this issue and great job!
Fixes #4158
What changes did you make and why did you make them ?
Created a new file
schedule-monthly.yml
in the.github/workflows
directory. This is a new GHA (Github Actions) workflow file containing one job namedlist-inactive-members
that will run on the first on the month at 1 AM Pacific (8AM UTC). The decision was made to run the action on the 1st of every month instead of on the last of the month for every month. Doing so eliminated the need to account for creating cron schedules that run from the 28th - 31th every month and corresponding scripts to check if the current day was actually the last day of the month.The
list-inactive-members
job created contains three GHAsteps
that correspond with their respective javascript file located withingithub-actions/trigger-schedule/list-inactive-members
. The three javascript files are outlined below.github-actions/trigger-schedule/list-inactive-members/get-list.js
is a newly created Javascript file that corresponds to the step namedGet List
located in the.github/workflows/schedule-monthly.yml
file. This script calls the Github API in various ways and gets a list of website-write team members who do not have any active issues.github-actions/trigger-schedule/list-inactive-members/create-new-issue.js
is a newly created Javascript file that corresponds to the step namedCreate New Issue
located in the.github/workflows/schedule-monthly.yml
file. This script takes the list of nonactive members created fromget-list.js
and creates a new issue within the hackforla repo that contains the list of nonactive members. The issue is then moved to the project board by creating a new project card linked to this issue. I could not find a way to programmatically move the issue to the project board without specifying a specific column; the issue is moved to theNew Issue Approval
column without using the existing automation.github-actions/trigger-schedule/list-inactive-members/comment-issue.js
is a newly created Javascript file that corresponds to the step namedComment Issue
located in the.github/workflows/schedule-monthly.yml
file. This script comments on issue HfLA: Dev/PM Agenda and Notes #2607 so that dev leads and PMs can review the list of non active members during planning.Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)
No visual Changes to the website.