Closed CWSites closed 2 years ago
Update, I setup my bot to have admin
rights and now it seems to be working for the most part, I'm now getting an error
Warning: Unexpected input(s) 'required_status_checks', 'enforce_admins', 'required_conversation_resolution', 'required_pull_request_reviews', valid inputs are ['route', 'mediaType']
Run octokit/request-action@v2.0.24
PUT /repos/digital-ai/dot-components/branches/develop/protection
> mediaType: [object Object]
> required_status_checks: null
> enforce_admins: null
> required_conversation_resolution: null
> required_pull_request_reviews: null
Error: Invalid request.
"restrictions" wasn't supplied.
Alrighty, it's all working now, for more details I have a thread here: https://github.community/t/branch-protection-api-returning-404/217405/10
I've tried many things suggested in the docs both here and through GitHub, answers to issues and this is what I've come up with. No matter what I try nothing works and I still get a 404, even when using
curl
.I've noticed that
mediaType
isn't consistent and appears as if people add in whatever they feel like. I suspect that may be causing an issue, however if that was the case then why are none of the other answers working? I removed the variables and just hard coded since I know which branch my action will be running on.I also want to point out that we are on GitHub Enterprise and this is a private repo. I am using an access token that has write privileges, NOT a personal access token.
Configuration
Output