graph.v2 workflow roots are ready pool work: finalize attaches via tracks, so a spare polecat claims the root and burns a session (gc-dz64s)
#216
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: Auto-label new issues and PRs | |
| on: | |
| issues: | |
| types: [opened, reopened] | |
| pull_request_target: | |
| types: [opened, reopened, ready_for_review] | |
| permissions: {} | |
| jobs: | |
| # pull_request_target is safe here because this job never checks out or runs | |
| # pull request code; it only labels the issue/PR from event metadata. | |
| add-triage-label: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| steps: | |
| - name: Add needs-triage label | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 | |
| with: | |
| script: | | |
| const pullRequest = context.payload.pull_request; | |
| if (pullRequest?.draft) { | |
| console.log(`Skipping draft PR #${pullRequest.number}`); | |
| return; | |
| } | |
| const number = context.issue?.number || pullRequest?.number; | |
| if (!number) { | |
| core.setFailed('Unable to determine issue or PR number'); | |
| return; | |
| } | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: number, | |
| labels: ['status/needs-triage'] | |
| }); |