Skip to content

Commit f11e120

Browse files
committed
Add conditional check for backport command and enforce label validation
1 parent 49bc84d commit f11e120

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/backport.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ permissions:
1414

1515
jobs:
1616
label:
17+
if: ${{ contains(github.event.comment.body, '/backport to') }}
1718
runs-on: ubuntu-latest
1819
steps:
1920
- name: Add Label
@@ -40,6 +41,8 @@ jobs:
4041
}
4142
backport:
4243
if: ${{ contains(github.event.comment.body, '/backport to') || github.event_name == 'schedule' }}
44+
# validates our branch format and that the issue is labeled before backport
45+
needs: label
4346
uses: dotnet/arcade/.github/workflows/backport-base.yml@main
4447
with:
4548
repository_owners: 'powershell,travisez13'

0 commit comments

Comments
 (0)