App Permissions: write Pull Requests but not Code? #190713
-
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
-
|
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! 🙌 |
Beta Was this translation helpful? Give feedback.
-
|
"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. |
Beta Was this translation helpful? Give feedback.
-
|
Makes sense, ty 🙏 |
Beta Was this translation helpful? Give feedback.

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.