Skip to content

Commit a7d943e

Browse files
authored
added github action to add a hold label when PRs are pushed to branch other than main (#1570)
Signed-off-by: Nir Rozenbaum <[email protected]>
1 parent 7108536 commit a7d943e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Label non-main PRs
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, synchronize, reopened]
6+
7+
jobs:
8+
add-label:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Add labels when base branch is not main
12+
if: github.event.pull_request.base.ref != 'main'
13+
uses: actions-ecosystem/action-add-labels@v1
14+
with:
15+
github_token: ${{ secrets.GITHUB_TOKEN }}
16+
labels: |
17+
do-not-merge/hold
18+
do-not-merge/cherry-pick-not-approved

0 commit comments

Comments
 (0)