Skip to content

Bug fixes to "Schedule Monthly" and "WR Schedule Monthly" workflows#8610

Open
t-will-gillis wants to merge 6 commits intohackforla:gh-pagesfrom
t-will-gillis:bug-fix-schedule-monthly-8596
Open

Bug fixes to "Schedule Monthly" and "WR Schedule Monthly" workflows#8610
t-will-gillis wants to merge 6 commits intohackforla:gh-pagesfrom
t-will-gillis:bug-fix-schedule-monthly-8596

Conversation

@t-will-gillis
Copy link
Copy Markdown
Member

@t-will-gillis t-will-gillis commented Apr 11, 2026

Fixes #8596

What changes did you make?

Why did you make the changes (we will use this info to test)?

  • Label will prevent check-closed-issue-for-linked-pr.yml from reopening issue
  • The await is needed because the function has an await; prevents race condition
  • Needed for similar reasons to prevent race condition
  • Need to use correct variable
  • Simplifies YML and cleans up "Close-New-Issue" by removing extraneous code

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

Screenshot 2024-10-28 154514

Please let us know that you have checked for CodeQL alerts. Please do not dismiss alerts.

  • I have checked this PR for CodeQL alerts and none were found.
  • I found CodeQL alert(s), and (select one):
    • I have resolved the CodeQL alert(s) as noted
    • I believe the CodeQL alert(s) is a false positive (Merge Team will evaluate)
    • I have followed the Instructions below, but I am still stuck (Merge Team will evaluate)
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)

Note 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.

  • You will need to have a functioning test environment on your local repo. Refer to Hack for LA's GitHub Actions, especially Tips 6, 7, & 8.
  • IMPORTANT: In addition to the 'files changed' in the PR, there are additional changes that you should make to help with testing. If you do not make these edits, you might delete or mis-edit Hack for LA data, delete team members, generate false or junk notifications, and/or create junk issues on HfLA's live Project Board.
  • In schedule-monthly.yml, you will need to activate two personal tokens (see Hack for LA's GitHub Actions)
    • HACKFORLA_BOT_PA_TOKEN scopes: admin:org_hook, public_repo
    • HACKFORLA_ADMIN_TOKEN scopes: admin:org_hook, repo, write:org
    • In the same file, around line 12, replace 'hackforla' with your personal repo.
    • Finally, add the line workflow_dispatch: under on: (in line with schedule:)
  • In get-contributors-data.js
    • Near line 84 replace with owner: 'hackforla',
    • Near line 85 replace with repo: 'website', (unless your repo is 'website')
  • In trim-inactive-members.js:
    • IMPORTANT: Disable the following by replacing:

      await github.request('DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}', {
                org: context.repo.owner,
                team_slug: team,
                username: username,
              });
          }
      

      with:

              console.log('Would be removed: ' + username);
              // await github.request('DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}', {
              //   org: context.repo.owner,
              //   team_slug: team,
              //   username: username,
              // });
            }
      
    • IMPORTANT: Disable the entirety of the closePrework() function, starting around ln 110:

      async function closePrework(member, issueNum){ 
        // Close the assignee's "Pre-work Checklist" and add comment
        // await github.request('PATCH /repos/{owner}/{repo}/issues/{issue_number}', {
        //   owner: org,
        //   repo: repo,
        //   issue_number: issueNum,
        //   state: 'closed'
        // });
        console.log(`Would be closing "Skills Issue" issue number  ${issueNum} for ${member}`);
        // // Add comment to issue
        // await github.request('POST /repos/{owner}/{repo}/issues/{issue_number}/comments', {
        //   owner: org,
        //   repo: repo,
        //   issue_number: issueNum,
        //   body: 'The Hack for LA Bot has closed this issue due to member inactivity.'
        // });
      }
      
  • In create-new-issue.js:
    • For const AGENDA_ISSUE_NUM = replace with an existing issue number in your repo
    • The variables for const owner and const repo are ok as is- do not replace.
    • IMPORTANT: replace the following lines exactly as shown:
      let removedList = removeList.map(x => "@ " + x).join("\n");    // important to add space
      let notifiedList = notifyList.map(x => "@ " + x).join("\n");   // important to add space
      
    • Towards the end of the files, comment out: // let milestone = parseInt(issueObject['milestone']);
    • And next: // milestone,
  • In /utils/get-team-members.js:
    • Ln 16, replace with org: 'hackforla',
  • In /utils/add-team-member.js:
    • Ln 11, replace with org: 'hackforla',
    • Ln 18, replace with org: 'hackforla',
  • In /utils/get-timeline.js:
    • Ln 16, replace with owner: 'hackforla',
    • Ln 17, replace with repo: 'website',
  • In /utils/post-issue-comment.js:
    • Ln 9, replace with owner: ' <your name> ', NOT 'hackforla'
    • Ln 10, replace with repo: 'website', or however you named your repo

@github-actions
Copy link
Copy Markdown

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.

git checkout -b t-will-gillis-bug-fix-schedule-monthly-8596 gh-pages
git pull https://github.com/t-will-gillis/website.git bug-fix-schedule-monthly-8596

@github-actions github-actions bot added role: back end/devOps Tasks for back-end developers Complexity: Large Feature: Refactor GHA Refactoring GitHub actions to fit latest architectural norms size: 5pt Can be done in 19-30 hours labels Apr 11, 2026
t-will-gillis added a commit that referenced this pull request Apr 11, 2026
@t-will-gillis t-will-gillis changed the title Bug fix schedule monthly 8596 Bug fixes to "Schedule Monthly" and "WR Schedule Monthly" workflows Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complexity: Large Feature: Refactor GHA Refactoring GitHub actions to fit latest architectural norms role: back end/devOps Tasks for back-end developers size: 5pt Can be done in 19-30 hours

Projects

Status: PR Needs review

Development

Successfully merging this pull request may close these issues.

Bug fix and clean up of "Schedule Monthly" workflow

1 participant