Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 7
Improve action that manages issue headers#28
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| name: Manage issue header | ||
| on: | ||
| issues: | ||
| types: [opened, reopened, labeled, unlabeled] | ||
| jobs: | ||
| call-workflow: | ||
| name: Call shared workflow | ||
| uses: learningequality/.github/.github/workflows/manage-issue-header.yml@main | ||
| secrets: | ||
| LE_BOT_APP_ID: ${{ secrets.LE_BOT_APP_ID }} | ||
| LE_BOT_PRIVATE_KEY: ${{ secrets.LE_BOT_PRIVATE_KEY }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,50 +1,51 @@ | ||
| name: Manage issue header | ||
| on: | ||
| issues: | ||
| types: [labeled, unlabeled] | ||
| workflow_call: | ||
| secrets: | ||
| LE_BOT_APP_ID: | ||
| description: "GitHub App ID for authentication" | ||
| required: true | ||
| LE_BOT_PRIVATE_KEY: | ||
| description: "GitHub App Private Key for authentication" | ||
| required: true | ||
| workflow_call: | ||
| secrets: | ||
| LE_BOT_APP_ID: | ||
| description: "GitHub App ID for authentication" | ||
| required: true | ||
| LE_BOT_PRIVATE_KEY: | ||
| description: "GitHub App Private Key for authentication" | ||
| required: true | ||
| jobs: | ||
| manage-issue-header: | ||
| runs-on: ubuntu-latest | ||
| if: | | ||
| github.event.action == 'opened' || | ||
| github.event.action == 'reopened' || | ||
| (github.event.action == 'labeled' && github.event.label.name == 'help wanted') || | ||
| (github.event.action == 'unlabeled' && github.event.label.name == 'help wanted') | ||
| steps: | ||
| - name: Generate App Token | ||
| - name: Generate GitHub token | ||
| id: generate-token | ||
| uses: tibdex/github-app-token@v2 | ||
| with: | ||
| app_id: ${{ secrets.LE_BOT_APP_ID }} | ||
| private_key: ${{ secrets.LE_BOT_PRIVATE_KEY }} | ||
| - name: Checkout called repository | ||
| uses: actions/checkout@v3 | ||
| - name: Checkout .github repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: learningequality/.github | ||
| ref: main | ||
| token: ${{ steps.generate-token.outputs.token }} | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v3 | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '16' | ||
| node-version: 20 | ||
| cache: 'yarn' | ||
| - name: Install dependencies | ||
| run: npm install | ||
| run: yarn install --frozen-lockfile | ||
MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is yarn's version of | ||
| - name: Run script | ||
| id: run-script | ||
| uses: actions/github-script@v6 | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| github-token: ${{ steps.generate-token.outputs.token }} | ||
| script: | | ||
| const script = require('./scripts/manage-issue-header.js'); | ||
| return await script({github, context, core}); | ||
| await script({github, context, core}); | ||
Uh oh!
There was an error while loading. Please reload this page.
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.
Would need to add the other event names here too, presumably.
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.
Yes, thanks!