mirror of
https://github.com/apache/superset.git
synced 2024-09-19 12:09:42 -04:00
21 lines
589 B
YAML
21 lines
589 B
YAML
|
name: Hold Label Check
|
||
|
|
||
|
on:
|
||
|
pull_request:
|
||
|
types: [labeled, unlabeled, opened, reopened, synchronize]
|
||
|
|
||
|
jobs:
|
||
|
check-hold-label:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Check for 'hold' label
|
||
|
uses: actions/github-script@v3
|
||
|
with:
|
||
|
github-token: ${{secrets.GITHUB_TOKEN}}
|
||
|
script: |
|
||
|
const payload = context.payload.pull_request
|
||
|
const holdLabelPresent = !!payload.labels.find(label => label.name.includes('hold'))
|
||
|
if (holdLabelPresent) {
|
||
|
core.setFailed('Hold label is present, merge is blocked.')
|
||
|
}
|