[valve] Add endstop_valve platform (cover/valve refactor 4/5) #37
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: Status check labels | |
| on: | |
| pull_request: | |
| types: [opened, reopened, labeled, unlabeled, synchronize] | |
| permissions: | |
| pull-requests: read # issues.listLabelsOnIssue to detect blocking labels (needs-docs, merge-after-release, chained-pr) | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| check: | |
| name: Check blocking labels | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check for blocking labels | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | |
| with: | |
| script: | | |
| const blockingLabels = ['needs-docs', 'merge-after-release', 'chained-pr']; | |
| const { data: labels } = await github.rest.issues.listLabelsOnIssue({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number | |
| }); | |
| const labelNames = labels.map(l => l.name); | |
| const found = blockingLabels.filter(bl => labelNames.includes(bl)); | |
| if (found.length > 0) { | |
| core.setFailed(`Pull request cannot be merged, it has blocking label(s): ${found.join(', ')}`); | |
| } |