[Feature Request] Mark PR as Merged from Pull Request API #12437
Replies: 13 comments 5 replies
-
I would like this too, basically our GitHub repos are generated with Copybara, so merging pull requests are done on the internal repo and then pushed out using Copybara. I'd like to be able to able to mark the pull requests as "merged", since I don't want external contributors to feel like I'm rejecting all pull requests. |
Beta Was this translation helpful? Give feedback.
-
It's literally been months since I first raised this. Does any feedback in the discussions section ever get considered at all, or is this section just here to give the illusion that feedback is welcome? |
Beta Was this translation helpful? Give feedback.
-
Going to link my old feature request here: https://github.com/orgs/community/discussions/24641 |
Beta Was this translation helpful? Give feedback.
-
Bumping, this is becoming incredibly frustrating |
Beta Was this translation helpful? Give feedback.
-
Apache projects are using a custom strategy for merging PR-s. For them, I think this feature would be incredibly useful. For example, most of these PR-s are actually merged: https://github.com/apache/nifi/pulls?q=is%3Apr+is%3Aclosed+ |
Beta Was this translation helpful? Give feedback.
-
Additionally, it would be nice to also have the ability to set the hash of the merging commit, so that when the commit is clicked on, it will link back to the Pull Request that was marked as merged, as it already is with current PRs merged normally |
Beta Was this translation helpful? Give feedback.
-
+1 for this feature, I work with a repo where we use a custom rebase and push flow, and thus the merged PRs end up red |
Beta Was this translation helpful? Give feedback.
-
This is also needed by FreeBSD (https://github.com/freebsd/freebsd-src/) |
Beta Was this translation helpful? Give feedback.
-
We're using similar approach in the place I work. So, most of our closed PRs were actually merged, but together with othe PRs in a single rebased commit. Would be awesome to mark them as merged. |
Beta Was this translation helpful? Give feedback.
-
This not being feasible remains frustrating as it has been for the last 10 years, not only does it make visualising and classifying PRs more annoying than needs be it actively hinders usage of other github features: linked issues work off of PRs being merged (which does make sense), so projects with a complex or external PR integration system are unable to benefit, and have to do this by hand. Then again like the "fixes #something" annotations in commits it also seems to be gated to merges to the default branch, so might be useless regardless. |
Beta Was this translation helpful? Give feedback.
-
Any updates here? Searched for this a bit but couldn't find anything new related. Would love this to be a feature, as I work on a repo that has both an internal and external version and I don't want the PRs from the external repo to look like they are all being closed without being merged. |
Beta Was this translation helpful? Give feedback.
-
+1 for this feature |
Beta Was this translation helpful? Give feedback.
-
It would be nice to be able to do:
Instead of just state: Or alternatively, be able to do something like:
And then have GitHub do whatever it needs to in the background to mark the PR as successfully merged without actually creating another merge commit. Or, ignoring the API for a moment, as other people have commented before it could also be enough to be able to put "Merges #N" in the merge commit body to have GitHub mark the pull request as merged. (Though this approach doesn't help people retroactively fix their repositories.) |
Beta Was this translation helpful? Give feedback.
-
From the original thread initially started on the forum at https://github.community/t/feature-request-mark-pull-request-as-merged/14194:
The “Merge Button” API allows marking a PR as merged even if the PR’s actual commits don’t end up in the target branch (e.g. “squash” or “rebase” merges).
However, when closing PRs via the PR API it’s not possible to override the “merged” flag (github sets it automatically based on the PR head landing in the target branch, or so I guess). So in situations where a tool wants to perform PR integration itself (such as the implementing not rocket science rule of software engineering 11), it becomes impossible to mark PRs as “merged” in the github sense, it’s only possible to use ad-hoc flags to try and differentiate “closed and integrated” from “closed and rejected”.
Would it be possible to add the ability to set / override the merged status in the PR API, something the Merge Button API can apparently do internally?
Request context: people would like bors-ng to provide more integration strategies than just a merge commit 4, currently this requires picking the least bad option between “don’t integrate the actual commits we tested” and “lose the merged flag”
Beta Was this translation helpful? Give feedback.
All reactions