Skip to content

Commit

Permalink
fix: Pass the github token to all jobs in the workflows.
Browse files Browse the repository at this point in the history
We weren't passing the GITHUB_TOKEN to both steps of the quarterly task
which was causing it to fail on the first step which didn't pass the
GITHUB_TOKEN.

Rather than just fixing the one step, I updated both the quarterly and
weekly file to pass the GITHUB_TOKEN env to all jobs/steps in their
respective workflow files.  Since these files should be only github
issue creation commands I think this is fine to do and simplifes things
and makes the workflows less error prone.
  • Loading branch information
feanil committed Jun 18, 2024
1 parent 3253055 commit 97790f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/add-quarterly-gh-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
- cron: 0 0 1 1,4,7,10 *
workflow_dispatch: {}

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
create_issue:
name: Create quarterly issues
Expand All @@ -23,5 +26,3 @@ jobs:
--title "Quarterly repo-checks.py Run" \
--label "github-request" \
--body "It is time to perform the quartely run of \`repo-checks.py\` for the \`openedx\` org. Instructions for running the script can be found [here](https://github.com/openedx/repo-tools/tree/master/edx_repo_tools/repo_checks#usage)."
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 4 additions & 3 deletions .github/workflows/add-weekly-gh-requests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Create weekly issues
on:
schedule:
- cron: 0 0 * * 0
- cron: 0 0 * * 0
workflow_dispatch: {}

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
create_issue:
name: Create weeksly issues
Expand All @@ -16,5 +19,3 @@ jobs:
--title "Welcome new discourse members" \
--label "github-request" \
--body "Go through [new discourse introductions](https://discuss.openedx.org/c/community/introductions/18) and welcome new people to the community."
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 97790f4

Please sign in to comment.