2023-08-15 01:28:17 +00:00
|
|
|
name: Issue Unlabeled
|
|
|
|
|
|
|
|
on:
|
|
|
|
issues:
|
|
|
|
types: [unlabeled]
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
issue-unlabeled-blocked:
|
|
|
|
name: All blocked/* labels removed
|
|
|
|
if: startsWith(github.event.label.name, 'blocked/')
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check for any blocked labels
|
|
|
|
id: check-for-blocked-labels
|
|
|
|
run: |
|
|
|
|
set -eo pipefail
|
|
|
|
BLOCKED_LABEL_COUNT=$(echo '${{ toJSON(github.event.issue.labels.*.name) }}' | jq '[ .[] | select(startswith("blocked/")) ] | length')
|
|
|
|
if [[ $BLOCKED_LABEL_COUNT -eq 0 ]]; then
|
|
|
|
echo "NOT_BLOCKED=1" >> "$GITHUB_OUTPUT"
|
|
|
|
fi
|
|
|
|
- name: Generate GitHub App token
|
|
|
|
if: ${{ steps.check-for-blocked-labels.outputs.NOT_BLOCKED }}
|
2023-08-30 15:09:33 +00:00
|
|
|
uses: electron/github-app-auth-action@cc6751b3b5e4edc5b9a4ad0a021ac455653b6dc8 # v1.0.0
|
2023-08-15 01:28:17 +00:00
|
|
|
id: generate-token
|
2023-08-30 15:09:33 +00:00
|
|
|
with:
|
|
|
|
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
|
|
|
org: electron
|
2023-08-15 01:28:17 +00:00
|
|
|
- name: Set status
|
2023-08-30 15:09:33 +00:00
|
|
|
if: ${{ steps.check-for-blocked-labels.outputs.NOT_BLOCKED }}
|
2023-08-15 01:28:17 +00:00
|
|
|
uses: github/update-project-action@2d475e08804f11f4022df7e21f5816531e97cb64 # v2
|
|
|
|
with:
|
2023-08-30 15:09:33 +00:00
|
|
|
github_token: ${{ steps.generate-token.outputs.token }}
|
2023-08-15 01:28:17 +00:00
|
|
|
organization: electron
|
|
|
|
project_number: 90
|
|
|
|
content_id: ${{ github.event.issue.node_id }}
|
|
|
|
field: Status
|
|
|
|
value: 📥 Was Blocked
|