Skip to content

Commit ed8841b

Browse files
committed
Do not process closed PRs
1 parent ee9e61d commit ed8841b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: process_pr.py

+7
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,9 @@ def process_pr(repo_config, gh, repo, issue, dryRun, cmsbuild_user=None, force=F
10431043
)
10441044
issue.create_comment(msg)
10451045
return
1046+
if pr.merged and (not force):
1047+
logger.error("This PR is merged, quitting")
1048+
return
10461049
# A pull request is by default closed if the branch is a closed one.
10471050
if is_closed_branch(pr.base.ref):
10481051
mustClose = True
@@ -1667,6 +1670,10 @@ def process_pr(repo_config, gh, repo, issue, dryRun, cmsbuild_user=None, force=F
16671670
if not dryRun:
16681671
issue.edit(state="open")
16691672

1673+
if issue.pull_request and pr.state == "closed" and not reOpen:
1674+
logger.info("PR is closed and reopen not requested - quitting")
1675+
return
1676+
16701677
if issue.pull_request:
16711678
if (
16721679
pr.commits >= TOO_MANY_COMMITS_WARN_THRESHOLD

0 commit comments

Comments
 (0)