Skip to content

Commit 2ef0ab1

Browse files
authored
Skip locks on push into a draft PR (#2342)
1 parent 53173e5 commit 2ef0ab1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/controllers/github_pull_request.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ func handlePullRequestEvent(gh utils.GithubClientProvider, payload *github.PullR
251251
return nil
252252
}
253253

254-
// special case for when a draft pull request is opened and ignore PRs is set to true we DO NOT want to lock the projects
255-
if !config.AllowDraftPRs && isDraft && action == "opened" {
254+
// don't lock when a draft pull request is opened, or a commit to it is pushed
255+
if !config.AllowDraftPRs && isDraft && (action == "opened" || action == "synchronize") {
256256
slog.Info("Draft PRs are disabled, skipping PR",
257257
"prNumber", prNumber,
258258
"isDraft", isDraft,

0 commit comments

Comments
 (0)