Is it possible to add GitHub Apps Bot to CODEOWNERS? #23064
|
Hi, there I wanna add my GitHub Apps bot to CODEOWNERS to automate approval processes. I’ve already tried to do it like following, but not work. The bot has access to the repository with read&write permission. Is it possible to add the bot to CODEOWNERS or not? If possible, how can I define CODEOWNERS? |
Replies: 37 comments 19 replies
|
Hi @0gajun, Thank you for being here! Currently, GitHub Apps can’t be used in CODEOWNERS – that’s not supported. It’s something the team is considering for the future, and I’ll be sure to add your use case to the internal feature request. |
|
I wrote a github app to merge code automatically if it passes CI checks and meets certain criteria that would designate the PR as a minimal change. For more involved changes, we do want owners to approve. It works in my test repo, but the repo I installed it on eventually has a CODEOWNERS file. When the app attempts to merge, I get an error message as shown below, even though it has merge access. There doesn’t seem to be any way to override this message, and this response is completely undocumented. Between this and github actions, I’ve had multiple mishaps and re-writes that I’ve had to do that have resulted in around 1-2 weeks of lost time on this project, primarily due to documentation issues and frankly bugs on what the docs say github supports. It would be nice if this stuff would work as documented and if bots with merge access wouldn’t get error messages back saying they can’t merge. Even just a force parameter to override the error message would give me what I need, but that doesn’t appear to exist. # with merge bot (github app) token # with user API token |
|
We also have a bot that needs the ability to force an approval and merge PRs. Where can we track this issue/feature request? Is it in a roadmap, ticket, or repo issue somewhere? Best Regards |
|
bump |
|
Is it possible however to add |
|
It it possible to add a GitHub app to the CODEOWNERS file? |
|
I also would find this very useful. Github, you should really look into this. |
|
Waiting for this... |
|
Eager to see this feature.... |
|
Or at least allow the bot to be added to a team. |
|
The ability to add a github app to a team would be extremely helpful for our use-case given we use CODEOWNERS |
|
We are also looking forward to it. This would be extremely helpful. |
|
We also are using github apps to auto create and approve PRs. We also use CODEOWNERS on our repos and this would be very useful for us. |
|
Hey @AndreaGriffiths11! |
|
Hello Our org is also working towards an auto approval mechanism for renovate PRs. This would be extremely helpful. Waiting for this 🙇♀️ |
|
We want to add @coderabbitai to our code owners. |
|
My organisation would also love the ability to allow a GitHub App the ability to approve PRs where branch protection requires a review from CODEOWNERS. Please can we get an idea if this is on your roadmap or how we can track progress on this? |
|
This is a huge limitation in Github Apps, and is preventing us from deprecating old service accounts and migrating them fully to Github Apps. |
|
Is there an ETA on this feature? Its over 4 years old. Does anyone have a solid workaround for this? |
|
@AndreaGriffiths11 any updates on this? Seems like a common use case that's missing rn |
|
Wouldn't a required status check act as a workaround? Sure you can't require approval for specific files but you could write that logic into your GitHub app and send a successful status check if those files aren't modified. |
|
Unfortunately, As of February 2025, this is still not supported. When attempting to add a bot to the # .github/CODEOWNERS
* app/github-actions
* @github-actions
* @github-actions[bot] |
|
We have an automatic PR validation running with Github Actions and it would be very beneficial if we could have the bot as the CODEOWNER because otherwise it happens regularly that some hyperactive user approves and clicks the merge button before the validation has actually finished. If the github-actions bot would be the code owner then that temptation could be avoided. +1 |
|
This issue is now five years old. Could we please have an update on whether this is taken into consideration at all? It starts to feel a bit like messages are just sent into the void. The workarounds of adding your dependency definitions to the codeowners exclusion list breaks code ownership policies, and personal access tokens where the bot impersonates a real person introduces operational overhead (now token management, offboarding impersonated users). As such, developers refrain from automating dependency management, which introduces risk. Please help us automaters to automate our work, and we'll have more time to automate for the rest of the world. Thanks very much in advance <3 |
|
June 2025, we need an update on this. |
|
Any news about it? I already added my vote here: https://github.com/orgs/community/discussions/108490 tho :) |
|
Guys, in the AI era it's mandatory to have this support, any plans to do it?? |
|
Easy interim solution is to create a service account, add that account to the CODEOWNERS team, and then add an extra step to approve using that account. |


Hi @0gajun,
Thank you for being here! Currently, GitHub Apps can’t be used in CODEOWNERS – that’s not supported. It’s something the team is considering for the future, and I’ll be sure to add your use case to the internal feature request.