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
2
2
3
3
on :
4
4
pull_request_target :
5
- types : [closed]
5
+ types : [closed, labeled ]
6
6
branches :
7
7
- main
8
8
@@ -13,9 +13,13 @@ permissions:
13
13
jobs :
14
14
backport :
15
15
# Only run if the PR was merged (not just closed) and has one of the backport labels
16
+ # or has been added afterwards.
16
17
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
+ )
19
23
runs-on : ubuntu-latest
20
24
21
25
steps :
You can’t perform that action at this time.
0 commit comments