Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

enforce labeling of PRs v2 (#7683)

Shahmir Varqha7dc3fb4be060
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
index f22ad65647..3321227381 100644
--- a/.github/workflows/labeler.yml
+++ b/.github/workflows/labeler.yml
@@ -1,17 +1,32 @@
name: 🏷️ Pull Request Labeler
# Label pull requests based on config in .github/labeler.yml
+# And enforces that at least one label is selected
-on: [pull_request_target]
+on:
+ pull_request_target:
+ types: [labeled, unlabeled, opened, reopened, edited, synchronize]
+ pull_request:
+ types: [labeled, unlabeled, opened, reopened, edited, synchronize]
permissions:
contents: read
pull-requests: write
jobs:
- label:
+ auto-label:
+ if: github.event_name == 'pull_request_target'
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
+
+ enforce-label:
+ if: github.event_name == 'pull_request'
+ runs-on: ubuntu-latest
+ steps:
+ - uses: yogevbd/[email protected]
+ with:
+ REQUIRED_LABELS_ANY: "enhancement,bug,documentation,internal,preview,other"
+ REQUIRED_LABELS_ANY_DESCRIPTION: "🏷️ Select at least one label: ['enhancement','bug','documentation','internal','preview','other']"