Should API allow reviewing merged PRs? Web UI prevents, but API allows #189039
Replies: 3 comments
-
|
Thanks for raising this — the inconsistency between the Web UI and API behavior here is a real pain point, especially for teams building tooling on top of the API that expect parity with what the UI enforces. A few thoughts: The current state creates real problems:
Suggested resolution: For any consumers relying on the current behavior, a deprecation notice + grace period would be the right path. Re: the spam concern in cli#5038 — agreed that locking is the right mitigation for maintainers, but that doesn't preclude also closing this API inconsistency. Both can be true. Happy to help test or provide reproduction steps if that's useful. |
Beta Was this translation helpful? Give feedback.
-
|
Regarding the API behavior that allows reviewing merged pull requests, causing inconsistency between the web UI (which prevents this) and API clients like the gh CLI. Summary of the situation: Community consensus points: Recommended path forward: |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for raising this — the inconsistency between the web UI and the API behavior is definitely understandable from a maintainer perspective. Right now the behavior seems to come from a design difference between the GitHub Web Interface and the GitHub API. The web UI intentionally prevents submitting reviews on already merged pull requests, while the API still allows it. Because the GitHub CLI relies on the API, it ends up inheriting that behavior. From a tooling perspective, it makes sense that the CLI wouldn’t enforce stricter rules than the API itself, since that could create unexpected behavior for users who depend on the API’s current capabilities. Also worth noting: even if reviews were blocked on merged PRs, maintainers would still need moderation tools because spam can still occur through comments. In practice, the most reliable mitigation is usually repository-level controls such as:
Given that this behavior originates at the platform level, discussing it in the GitHub Pull Requests feedback category is probably the right route so the GitHub platform team can evaluate whether the API and UI should behave consistently. Personally, I can also see legitimate use cases for post-merge reviews (for example retroactive code review, audit notes, or training feedback), so any change would likely need to be considered carefully to avoid breaking workflows that depend on the current API behavior. Appreciate the thoughtful discussion around this. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
The API allowing reviewing merged PRs right now causes inconsistency and confusion between web UI (prevents this behavior) and other API clients like the
ghCLI.See cli/cli#5038
I personally like being able to review merged PRs. I think maintainers should rely on locking an issue or PR to prevent spam since people can still spam by commenting on merged PRs.
Beta Was this translation helpful? Give feedback.
All reactions