Skip to content

Commit d9dcec4

Browse files
committed
closed pr never trigger webhook and action
1 parent 79e7a6e commit d9dcec4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

services/pull/pull.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,10 @@ func AddTestPullRequestTask(doer *user_model.User, repoID int64, branch string,
294294
}
295295
if err == nil {
296296
for _, pr := range prs {
297+
if pr.Issue.IsClosed {
298+
// If PR is closed, never trigger webhook or action
299+
continue
300+
}
297301
if newCommitID != "" && newCommitID != git.EmptySHA {
298302
changed, err := checkIfPRContentChanged(ctx, pr, oldCommitID, newCommitID)
299303
if err != nil {

0 commit comments

Comments
 (0)