ci: use new GitHub App for issue triage related actions (#39635)
This commit is contained in:
parent
e66c1f6c56
commit
2182202e8e
6 changed files with 48 additions and 37 deletions
11
.github/workflows/branch-created.yml
vendored
11
.github/workflows/branch-created.yml
vendored
|
@ -60,16 +60,15 @@ jobs:
|
||||||
done
|
done
|
||||||
- name: Generate GitHub App token
|
- name: Generate GitHub App token
|
||||||
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
||||||
|
uses: electron/github-app-auth-action@cc6751b3b5e4edc5b9a4ad0a021ac455653b6dc8 # v1.0.0
|
||||||
id: generate-token
|
id: generate-token
|
||||||
env:
|
with:
|
||||||
RELEASE_BOARD_GH_APP_CREDS: ${{ secrets.RELEASE_BOARD_GH_APP_CREDS }}
|
creds: ${{ secrets.RELEASE_BOARD_GH_APP_CREDS }}
|
||||||
run: |
|
org: electron
|
||||||
TOKEN=$(npx @electron/github-app-auth --creds=$RELEASE_BOARD_GH_APP_CREDS --org=electron)
|
|
||||||
echo "TOKEN=$TOKEN" >> "$GITHUB_OUTPUT"
|
|
||||||
- name: Create Release Project Board
|
- name: Create Release Project Board
|
||||||
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ steps.generate-token.outputs.TOKEN }}
|
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||||
MAJOR: ${{ steps.check-major-version.outputs.MAJOR }}
|
MAJOR: ${{ steps.check-major-version.outputs.MAJOR }}
|
||||||
ELECTRON_ORG_ID: "O_kgDOAMybxg"
|
ELECTRON_ORG_ID: "O_kgDOAMybxg"
|
||||||
ELECTRON_REPO_ID: "R_kgDOAI8xSw"
|
ELECTRON_REPO_ID: "R_kgDOAI8xSw"
|
||||||
|
|
12
.github/workflows/issue-commented.yml
vendored
12
.github/workflows/issue-commented.yml
vendored
|
@ -5,20 +5,22 @@ on:
|
||||||
types:
|
types:
|
||||||
- created
|
- created
|
||||||
|
|
||||||
permissions:
|
permissions: {}
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
issue-commented:
|
issue-commented:
|
||||||
name: Remove blocked/need-repro on comment
|
name: Remove blocked/need-repro on comment
|
||||||
if: ${{ contains(github.event.issue.labels.*.name, 'blocked/need-repro') && !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) }}
|
if: ${{ contains(github.event.issue.labels.*.name, 'blocked/need-repro') && !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) }}
|
||||||
permissions:
|
|
||||||
issues: write
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Generate GitHub App token
|
||||||
|
uses: electron/github-app-auth-action@cc6751b3b5e4edc5b9a4ad0a021ac455653b6dc8 # v1.0.0
|
||||||
|
id: generate-token
|
||||||
|
with:
|
||||||
|
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
||||||
- name: Remove label
|
- name: Remove label
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||||
ISSUE_URL: ${{ github.event.issue.html_url }}
|
ISSUE_URL: ${{ github.event.issue.html_url }}
|
||||||
run: |
|
run: |
|
||||||
gh issue edit $ISSUE_URL --remove-label 'blocked/need-repro'
|
gh issue edit $ISSUE_URL --remove-label 'blocked/need-repro'
|
||||||
|
|
20
.github/workflows/issue-labeled.yml
vendored
20
.github/workflows/issue-labeled.yml
vendored
|
@ -14,18 +14,15 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Generate GitHub App token
|
- name: Generate GitHub App token
|
||||||
|
uses: electron/github-app-auth-action@cc6751b3b5e4edc5b9a4ad0a021ac455653b6dc8 # v1.0.0
|
||||||
id: generate-token
|
id: generate-token
|
||||||
env:
|
with:
|
||||||
RELEASE_BOARD_GH_APP_CREDS: ${{ secrets.RELEASE_BOARD_GH_APP_CREDS }}
|
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
||||||
run: |
|
org: electron
|
||||||
set -eo pipefail
|
|
||||||
TOKEN=$(npx @electron/github-app-auth --creds=$RELEASE_BOARD_GH_APP_CREDS --org=electron)
|
|
||||||
echo "TOKEN=$TOKEN" >> "$GITHUB_OUTPUT"
|
|
||||||
- name: Set status
|
- name: Set status
|
||||||
if: ${{ steps.generate-token.outputs.TOKEN }}
|
|
||||||
uses: github/update-project-action@2d475e08804f11f4022df7e21f5816531e97cb64 # v2
|
uses: github/update-project-action@2d475e08804f11f4022df7e21f5816531e97cb64 # v2
|
||||||
with:
|
with:
|
||||||
github_token: ${{ steps.generate-token.outputs.TOKEN }}
|
github_token: ${{ steps.generate-token.outputs.token }}
|
||||||
organization: electron
|
organization: electron
|
||||||
project_number: 90
|
project_number: 90
|
||||||
content_id: ${{ github.event.issue.node_id }}
|
content_id: ${{ github.event.issue.node_id }}
|
||||||
|
@ -49,11 +46,18 @@ jobs:
|
||||||
if [[ $COMMENT_COUNT -eq 0 ]]; then
|
if [[ $COMMENT_COUNT -eq 0 ]]; then
|
||||||
echo "SHOULD_COMMENT=1" >> "$GITHUB_OUTPUT"
|
echo "SHOULD_COMMENT=1" >> "$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
|
- name: Generate GitHub App token
|
||||||
|
if: ${{ steps.check-for-comment.outputs.SHOULD_COMMENT }}
|
||||||
|
uses: electron/github-app-auth-action@cc6751b3b5e4edc5b9a4ad0a021ac455653b6dc8 # v1.0.0
|
||||||
|
id: generate-token
|
||||||
|
with:
|
||||||
|
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
||||||
- name: Create comment
|
- name: Create comment
|
||||||
if: ${{ steps.check-for-comment.outputs.SHOULD_COMMENT }}
|
if: ${{ steps.check-for-comment.outputs.SHOULD_COMMENT }}
|
||||||
uses: actions-cool/issues-helper@275328970dbc3bfc3bc43f5fe741bf3638300c0a # v3.3.3
|
uses: actions-cool/issues-helper@275328970dbc3bfc3bc43f5fe741bf3638300c0a # v3.3.3
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
body: |
|
body: |
|
||||||
<!-- blocked/need-repro -->
|
<!-- blocked/need-repro -->
|
||||||
|
|
||||||
|
|
14
.github/workflows/issue-unlabeled.yml
vendored
14
.github/workflows/issue-unlabeled.yml
vendored
|
@ -23,18 +23,16 @@ jobs:
|
||||||
fi
|
fi
|
||||||
- name: Generate GitHub App token
|
- name: Generate GitHub App token
|
||||||
if: ${{ steps.check-for-blocked-labels.outputs.NOT_BLOCKED }}
|
if: ${{ steps.check-for-blocked-labels.outputs.NOT_BLOCKED }}
|
||||||
|
uses: electron/github-app-auth-action@cc6751b3b5e4edc5b9a4ad0a021ac455653b6dc8 # v1.0.0
|
||||||
id: generate-token
|
id: generate-token
|
||||||
env:
|
with:
|
||||||
RELEASE_BOARD_GH_APP_CREDS: ${{ secrets.RELEASE_BOARD_GH_APP_CREDS }}
|
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
||||||
run: |
|
org: electron
|
||||||
set -eo pipefail
|
|
||||||
TOKEN=$(npx @electron/github-app-auth --creds=$RELEASE_BOARD_GH_APP_CREDS --org=electron)
|
|
||||||
echo "TOKEN=$TOKEN" >> "$GITHUB_OUTPUT"
|
|
||||||
- name: Set status
|
- name: Set status
|
||||||
if: ${{ steps.generate-token.outputs.TOKEN }}
|
if: ${{ steps.check-for-blocked-labels.outputs.NOT_BLOCKED }}
|
||||||
uses: github/update-project-action@2d475e08804f11f4022df7e21f5816531e97cb64 # v2
|
uses: github/update-project-action@2d475e08804f11f4022df7e21f5816531e97cb64 # v2
|
||||||
with:
|
with:
|
||||||
github_token: ${{ steps.generate-token.outputs.TOKEN }}
|
github_token: ${{ steps.generate-token.outputs.token }}
|
||||||
organization: electron
|
organization: electron
|
||||||
project_number: 90
|
project_number: 90
|
||||||
content_id: ${{ github.event.issue.node_id }}
|
content_id: ${{ github.event.issue.node_id }}
|
||||||
|
|
13
.github/workflows/pull-request-labeled.yml
vendored
13
.github/workflows/pull-request-labeled.yml
vendored
|
@ -14,18 +14,15 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Generate GitHub App token
|
- name: Generate GitHub App token
|
||||||
|
uses: electron/github-app-auth-action@cc6751b3b5e4edc5b9a4ad0a021ac455653b6dc8 # v1.0.0
|
||||||
id: generate-token
|
id: generate-token
|
||||||
env:
|
with:
|
||||||
RELEASE_BOARD_GH_APP_CREDS: ${{ secrets.RELEASE_BOARD_GH_APP_CREDS }}
|
creds: ${{ secrets.RELEASE_BOARD_GH_APP_CREDS }}
|
||||||
run: |
|
org: electron
|
||||||
set -eo pipefail
|
|
||||||
TOKEN=$(npx @electron/github-app-auth --creds=$RELEASE_BOARD_GH_APP_CREDS --org=electron)
|
|
||||||
echo "TOKEN=$TOKEN" >> "$GITHUB_OUTPUT"
|
|
||||||
- name: Set status
|
- name: Set status
|
||||||
if: ${{ steps.generate-token.outputs.TOKEN }}
|
|
||||||
uses: dsanders11/update-project-action@7ade91760df70df76770a238abee7a4869e01cf8
|
uses: dsanders11/update-project-action@7ade91760df70df76770a238abee7a4869e01cf8
|
||||||
with:
|
with:
|
||||||
github_token: ${{ steps.generate-token.outputs.TOKEN }}
|
github_token: ${{ steps.generate-token.outputs.token }}
|
||||||
organization: electron
|
organization: electron
|
||||||
project_number: 94
|
project_number: 94
|
||||||
content_id: ${{ github.event.pull_request.node_id }}
|
content_id: ${{ github.event.pull_request.node_id }}
|
||||||
|
|
15
.github/workflows/stale.yml
vendored
15
.github/workflows/stale.yml
vendored
|
@ -5,15 +5,20 @@ on:
|
||||||
# 1:30am every day
|
# 1:30am every day
|
||||||
- cron: '30 1 * * *'
|
- cron: '30 1 * * *'
|
||||||
|
|
||||||
permissions:
|
permissions: {}
|
||||||
issues: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Generate GitHub App token
|
||||||
|
uses: electron/github-app-auth-action@cc6751b3b5e4edc5b9a4ad0a021ac455653b6dc8 # v1.0.0
|
||||||
|
id: generate-token
|
||||||
|
with:
|
||||||
|
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
||||||
- uses: actions/stale@5ebf00ea0e4c1561e9b43a292ed34424fb1d4578 # tag: v6.0.1
|
- uses: actions/stale@5ebf00ea0e4c1561e9b43a292ed34424fb1d4578 # tag: v6.0.1
|
||||||
with:
|
with:
|
||||||
|
repo-token: ${{ steps.generate-token.outputs.token }}
|
||||||
days-before-stale: 90
|
days-before-stale: 90
|
||||||
days-before-close: 30
|
days-before-close: 30
|
||||||
stale-issue-label: stale
|
stale-issue-label: stale
|
||||||
|
@ -29,8 +34,14 @@ jobs:
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
needs: stale
|
needs: stale
|
||||||
steps:
|
steps:
|
||||||
|
- name: Generate GitHub App token
|
||||||
|
uses: electron/github-app-auth-action@cc6751b3b5e4edc5b9a4ad0a021ac455653b6dc8 # v1.0.0
|
||||||
|
id: generate-token
|
||||||
|
with:
|
||||||
|
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
||||||
- uses: actions/stale@5ebf00ea0e4c1561e9b43a292ed34424fb1d4578 # tag: v6.0.1
|
- uses: actions/stale@5ebf00ea0e4c1561e9b43a292ed34424fb1d4578 # tag: v6.0.1
|
||||||
with:
|
with:
|
||||||
|
repo-token: ${{ steps.generate-token.outputs.token }}
|
||||||
days-before-stale: -1
|
days-before-stale: -1
|
||||||
days-before-close: 10
|
days-before-close: 10
|
||||||
remove-stale-when-updated: false
|
remove-stale-when-updated: false
|
||||||
|
|
Loading…
Reference in a new issue