Bug fixes to "Schedule Monthly" and "WR Schedule Monthly" workflows#8610
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. |
Rolling changes into #8610
Add permissions for reading repository contents.
|
Review ETA: 4/26 Hi @t-will-gillis, this PR is solid, nice work knocking out two race conditions in one go.
Everything looks good to me code-wise and in your test logs -- I just figure I need to go through the process of re-standing up my GHA test fixture and running this myself, hence the ETA. 😃 |
ryanfkeller
left a comment
There was a problem hiding this comment.
Hi @t-will-gillis, everything looks good on my end!
- Successful
schedule-monthly.ymlrun on my project (triggered manually): here - Subsequent successful
wr-schedule-monthly.ymlrun on my project: here
Great work on this PR, and thanks for including the detailed instructions on setting up the test environment! Approved.
|
Thank you @ryanfkeller! Merging with one approval because this will run tonight. |
Fixes #8596
What changes did you make?
trim-inactive-members.mdaddednon-PR contributionlabeltrim-inactive-members.jsaddedawait closePrework()fs.writeFile()tofs.writeFileSync()create-new-issue.jsreturned theissue.html_urland replacedletwithconstwr-schedule-monthly.ymlchangesWhy did you make the changes (we will use this info to test)?
check-closed-issue-for-linked-pr.ymlfrom reopening issueawaitis needed because the function has anawait; prevents race conditionCodeQL 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)
schedule-monthly.ymlwr-schedule-monthly.ymlNote to reviewers
If you review this, make sure to see the following resources first:
Important note: line numbers and specific code references may have changed slightly since the time of this Wiki- verify with the actual files.
schedule-monthly.yml, you will need to activate two personal tokens (see Hack for LA's GitHub Actions)HACKFORLA_BOT_PA_TOKENscopes: admin:org_hook, public_repoHACKFORLA_ADMIN_TOKENscopes: admin:org_hook, repo, write:orgworkflow_dispatch:underon:(in line withschedule:)get-contributors-data.jsowner: 'hackforla',repo: 'website',(unless your repo is 'website')trim-inactive-members.js:IMPORTANT: Disable the following by replacing:
with:
IMPORTANT: Disable the entirety of the
closePrework()function, starting around ln 110:create-new-issue.js:const AGENDA_ISSUE_NUM =replace with an existing issue number in your repoconst ownerandconst repoare ok as is- do not replace.// let milestone = parseInt(issueObject['milestone']);// milestone,/utils/get-team-members.js:org: 'hackforla',/utils/add-team-member.js:org: 'hackforla',org: 'hackforla',/utils/get-timeline.js:owner: 'hackforla',repo: 'website',/utils/post-issue-comment.js:owner: ' <your name> ',NOT 'hackforla'repo: 'website',or however you named your repo