Can't Add Bot to CODEOWNERS?
ryanagillie opened this issue · comments
Hello,
I have been recently using both renovate and renovate-approve for many of my repos. I ran into an issue where my CODEOWNERS file was breaking. I reached out to GitHub support this was their response. This directly conflicts with the description of
"If you need to add this bot to your CODEOWNERS, you can identify it using app/renovate-approve
."
Thanks for the feedback. I haven't used this feature, and haven't been able to find where the original user gave the feedback.
@rarkins I've tried every option I could come up with to specify renovate-approve
as a code owner without any success. Furthermore, when specifying it as app/renovate-approve
(without @
), it was breaking the whole CODEOWNERS workflow by not requesting reviews from them and not blocking a PR without a review (when configured to do so).
Is there any workaround to have an app as a code owner?
You'll need to ask GitHub, as it's their restrictions and not anything specific we're doing.
You cannot confirm or deny this information
If you need to add this bot to your CODEOWNERS, you can identify it using app/renovate-approve.
provided here: https://github.com/apps/renovate-approve?
It was information provided by a user, but it's possible it is was mistaken or GitHub changed their approach.
Thanks for clarification. I've contacted GitHub support about this matter, I'll relay their response here so that it would be more visible to the others.
@cy6erskunk did you have a chance to get an answer from the GitHub support?
Yeah, I've got an answer just a couple of hours ago saying:
Thanks for reaching out to GitHub Support!I'm sorry for the delayed reply - it's definitely taken us longer to respond than we would have liked.
Unfortunately it's not possible to use a GitHub app in a codeowners file.
However, you may be able to work around this by setting up a GitHub action to create a required status check:
https://docs.github.com/en/github/administering-a-repository/about-required-status-checks
I hope this helps.
Right now we're using a private GitHub Action to check if a PR has a required number of approvals from the people in the list (which includes renovate-approve bot in this case), I guess it's actually something like what GitHub support was suggesting.