Skip to content

Commit 1d49ec1

Browse files
authored
[FIX] cleaner.yml
1 parent c05c646 commit 1d49ec1

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/cleaner.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
name: Delete PR branch from fork and base repo
66

77
on:
8-
9-
deployment_status:
8+
pull_request:
9+
types: [closed]
10+
pull_request_target:
11+
types: [closed]
1012

1113
# Trigger manual
1214
workflow_dispatch:
@@ -22,6 +24,8 @@ jobs:
2224
if: >
2325
github.repository_owner == 'ingadhoc' &&
2426
(
27+
(github.event_name == 'pull_request' && github.event.pull_request.merged == false && github.event.sender.login == 'roboadhoc') ||
28+
(github.event_name == 'pull_request_target' && github.event.pull_request.merged == false && github.event.sender.login == 'roboadhoc') ||
2529
(github.event_name == 'workflow_dispatch') ||
2630
(github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success')
2731
)
@@ -90,6 +94,8 @@ jobs:
9094
return;
9195
}
9296
97+
} else if (['pull_request', 'pull_request_target'].includes(context.eventName)) {
98+
pullRequest = context.payload.pull_request;
9399
} else {
94100
core.setOutput('validation_passed', 'false');
95101
core.error(`Unsupported event type: ${context.eventName}`);

0 commit comments

Comments
 (0)