App Permissions: write Pull Requests but not Code? #190713
Replies: 4 comments
|
GitHub doesn’t currently support that level of fine-grained separation between “code” and “pull requests” permissions in the way you’re hoping. “Pull requests (write)” requires “Contents (write)” under the hood. Best workaround: That way, the app can write code, but can’t bypass your PR review process. |
|
Unfortunately, GitHub doesn't support that level of fine-grained separation natively — but here's a fuller picture of why, and what you can actually do about it: Why the limitation exists: Best ways to constrain the app in practice:
Bottom line: You can't remove the technical capability of the app to write code, but with branch protection + rulesets, you can make it impossible for it to bypass your PR review process. That's the practical equivalent of what you're looking for. Hope that helps! 🙌 |
|
"Write Pull Requests but not Code" ka matlab hai ki app pull requests create aur manage kar sakta hai, lekin direct repository ke code ko modify ya push nahi kar sakta. |
|
Makes sense, ty 🙏 |

GitHub doesn’t currently support that level of fine-grained separation between “code” and “pull requests” permissions in the way you’re hoping.
“Pull requests (write)” requires “Contents (write)” under the hood.
So if an app can create/update PRs, it can technically push code.
Best workaround:
Enable branch protection rules (no direct pushes to
main, require PR reviews)Limit the app to only selected repos (like you did)
That way, the app can write code, but can’t bypass your PR review process.