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
|
2023-09-11 07:33:39 +00:00
|
|
|
if: startsWith(github.event.label.name, 'blocked/') && github.event.issue.state == 'open'
|
2023-08-15 01:28:17 +00:00
|
|
|
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 }}
|
2024-02-14 10:13:03 +00:00
|
|
|
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
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 }}
|
2024-02-14 10:13:03 +00:00
|
|
|
uses: dsanders11/project-actions/edit-item@82e99438bd44a14ad18d92d036dbc25cbfb9a8c4 # v1.2.0
|
2023-08-15 01:28:17 +00:00
|
|
|
with:
|
2023-09-28 15:26:04 +00:00
|
|
|
token: ${{ steps.generate-token.outputs.token }}
|
|
|
|
project-number: 90
|
2023-08-15 01:28:17 +00:00
|
|
|
field: Status
|
2023-09-28 15:26:04 +00:00
|
|
|
field-value: 📥 Was Blocked
|