mirror of
https://github.com/apache/superset.git
synced 2024-09-19 03:59:49 -04:00
4c245850c4
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
26 lines
759 B
YAML
26 lines
759 B
YAML
name: Hold Label Check
|
|
|
|
on:
|
|
pull_request:
|
|
types: [labeled, unlabeled, opened, reopened, synchronize]
|
|
|
|
# cancel previous workflow jobs for PRs
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check-hold-label:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check for 'hold' label
|
|
uses: actions/github-script@v7
|
|
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.')
|
|
}
|