File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Backport to active branches
22
33on :
44 pull_request_target :
5- types : [closed]
5+ types : [closed, labeled ]
66 branches :
77 - main
88
@@ -13,9 +13,13 @@ permissions:
1313jobs :
1414 backport :
1515 # Only run if the PR was merged (not just closed) and has one of the backport labels
16+ # or has been added afterwards.
1617 if : |
17- github.event.pull_request.merged == true &&
18- contains(toJSON(github.event.pull_request.labels.*.name), 'backport-active-')
18+ github.event.pull_request.merged == true &&
19+ (
20+ (github.event.action == 'closed' && contains(toJSON(github.event.pull_request.labels.*.name), 'backport-active-')) ||
21+ (github.event.action == 'labeled' && startsWith(github.event.label.name, 'backport-active-'))
22+ )
1923 runs-on : ubuntu-latest
2024
2125 steps :
You can’t perform that action at this time.
0 commit comments