ci: automation for deprecation project board (#39477)

This commit is contained in:
David Sanders 2023-08-14 18:28:42 -07:00 committed by GitHub
parent dbff7bb531
commit 813853297d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,33 @@
name: Pull Request Labeled
on:
pull_request:
types: [labeled]
permissions:
contents: read
jobs:
pull-request-labeled-deprecation-review-complete:
name: deprecation-review/complete label added
if: github.event.label.name == 'deprecation-review/complete ✅'
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App token
id: generate-token
env:
RELEASE_BOARD_GH_APP_CREDS: ${{ secrets.RELEASE_BOARD_GH_APP_CREDS }}
run: |
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
if: ${{ steps.generate-token.outputs.TOKEN }}
uses: github/update-project-action@2d475e08804f11f4022df7e21f5816531e97cb64 # v2
with:
github_token: ${{ steps.generate-token.outputs.TOKEN }}
organization: electron
project_number: 94
content_id: ${{ github.event.pull_request.node_id }}
field: Status
value: ✅ Reviewed