This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 1f5ae74ad9 feat(ci): add a check to make sure there's no hold label on
the PR (#26877)
1f5ae74ad9 is described below
commit 1f5ae74ad93ff4dec706357fa21eb7e5651fe43e
Author: Maxime Beauchemin <[email protected]>
AuthorDate: Tue Jan 30 09:30:55 2024 -0800
feat(ci): add a check to make sure there's no hold label on the PR (#26877)
---
.github/workflows/no-hold-label.yml | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/.github/workflows/no-hold-label.yml
b/.github/workflows/no-hold-label.yml
new file mode 100644
index 0000000000..98b7f2abbe
--- /dev/null
+++ b/.github/workflows/no-hold-label.yml
@@ -0,0 +1,20 @@
+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.')
+ }