Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 1 of 1

Attach metadata to PR (other than status), or close / comment without notification?

When using an external tool to handle the PR integration process (see: Not Rocket Science Rule to Software Engineering) the external tool has to close the PR explicitly and should probably indicate where / how the PR was integrated (e.g. the hash of the merge / rebase / squash commit).

 

Via the API, this requires two calls:

PATCH /repos/:owner/:repo/pulls/:pull_number

 to change its state to closed then

POST /repos/:owner/:repo/issues/:issue_number/comment

to add a comment providing relevant information.

 

This, in turn, generates two notifications to every follower of the PR for what is essentially a single event. On busy repositories, this generates a lot of spam (even more so when using a tool like CPython's Miss Islington which semi-automatically creates backports for PRs, backports onto which the original contributors likely get automatically pinged. For instance python/cpython#16597 tags the original contributor & the original reviewer in comments, leading to them getting all messages by default, and thus a lot of churn. Even more so as PR notifications / pings tend to be relevant / high-SNR information (people or colleagues bringing up issues or asking for information / feedback) and would thus be amongst the last to be binned or web-only.

 

Alternatively, I'm also open to an other way (than a comment) of adding relevant information to the PR, edirting an existing comment (or the PR message) feels distasteful and adding such meta-information as status seems like a misuse of the feature, not to mention statuses apparently disappear / get suppressed when a PR is closed or merged which rather defeats the intent as we specifically want to tell users where the pull request was actually integrated into the history proper.