bug: beads_provider_lifecycle integration tests leak tempdir state into real user cities #1228
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Remove needs-triage when triaged | |
| on: | |
| issues: | |
| types: [labeled] | |
| pull_request_target: | |
| types: [labeled] | |
| jobs: | |
| remove-triage-label: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| steps: | |
| - name: Remove needs-triage when a non-status label is added | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 | |
| with: | |
| script: | | |
| const added = context.payload.label.name; | |
| if (added.startsWith('status/')) return; | |
| const number = context.issue?.number || context.payload.pull_request?.number; | |
| const target = 'status/needs-triage'; | |
| const current = await github.rest.issues.listLabelsOnIssue({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: number, | |
| }); | |
| if (!current.data.some(l => l.name === target)) return; | |
| await github.rest.issues.removeLabel({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: number, | |
| name: target, | |
| }); | |
| console.log(`Removed '${target}' from #${number} (triaged with '${added}')`); |