Skip to content

Commit

Permalink
NOBUG: Avoid already closed PRs to get any comment
Browse files Browse the repository at this point in the history
This is an adjustment for MDL-77166, where the auto-close PRs
workflow was introduced.

That workflow does close and lock any PR in the moodle/moodle.git repo.

We have detected that, when proceeding to lock the PRs it's
always adding a comment. But we only want that when closing the
PRs (as they are open). When the only task is to lock them (normally
old PRs that are already closed by not locked) we don't want any
comment to be added (so no notification/spam happens on those old PRs).

Luckily there is a setting for it: skip-closed-pr-comment: true

So applying for it. Note that we have run various tests in fork
repository and it seems to be working ok. Only open PRs got the
comment and closed PRs were silently locked.
  • Loading branch information
stronk7 committed Feb 21, 2024
1 parent 8654b66 commit eec4ca8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/close-pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
with:
process-only: prs
close-pr: true
skip-closed-pr-comment: true
pr-comment: >
**Please, don't open pull requests via GitHub.**
Expand Down

0 comments on commit eec4ca8

Please sign in to comment.