NOBUG: Avoid already closed PRs to get any comment
commiteec4ca8cf0c01320348ab231d8301029adc8e2ac
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 21 Feb 2024 07:08:43 +0000 (21 08:08 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 21 Feb 2024 07:27:39 +0000 (21 08:27 +0100)
treee9032d7a86b28522ca23449d2a9876fd0bbdef92
parent8654b66416391dd2665e5e67dafdbfa66b791698
NOBUG: Avoid already closed PRs to get any comment

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.
.github/workflows/close-pull-requests.yml