diff --git a/.github/workflows/non-main-gatekeeper.yml b/.github/workflows/non-main-gatekeeper.yml new file mode 100644 index 000000000..af91ea966 --- /dev/null +++ b/.github/workflows/non-main-gatekeeper.yml @@ -0,0 +1,18 @@ +name: Label non-main PRs + +on: + pull_request: + types: [opened, edited, synchronize, reopened] + +jobs: + add-label: + runs-on: ubuntu-latest + steps: + - name: Add labels when base branch is not main + if: github.event.pull_request.base.ref != 'main' + uses: actions-ecosystem/action-add-labels@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + labels: | + do-not-merge/hold + do-not-merge/cherry-pick-not-approved