-
Notifications
You must be signed in to change notification settings - Fork 170
33 lines (28 loc) · 1.12 KB
/
ReleaseBlockerLabelCleanUp.yml
File metadata and controls
33 lines (28 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Release Blocker Cleanup
on:
issues:
types: [closed]
permissions:
issues: write
contents: read
jobs:
remove-release-blocker:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Remove release-blocker label from closed issue
run: |
ISSUE_NUMBER=${{ github.event.issue.number }}
echo "Checking if issue #$ISSUE_NUMBER has release-blocker label..."
# Check if the issue has the release-blocker label
HAS_LABEL=$(gh issue view "$ISSUE_NUMBER" --json labels -q '.labels[] | select(.name == "release-blocker") | .name')
if [ -n "$HAS_LABEL" ]; then
echo "✅ Issue #$ISSUE_NUMBER has release-blocker label, removing it..."
gh issue edit "$ISSUE_NUMBER" --remove-label "release-blocker"
echo "✅ Successfully removed release-blocker label from issue #$ISSUE_NUMBER"
else
echo "ℹ️ Issue #$ISSUE_NUMBER does not have release-blocker label, no action needed"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}