HttpError: Validation Failed on trying to update branch protection
See original GitHub issueBug Report
Current Behavior Trying to update branch protection through context.github fails with validation failed error message.
try {
await context.github.repos.updateBranchProtection({
owner,
repo,
branch,
required_status_checks,
enforce_admins,
required_pull_request_reviews,
restrictions,
headers
})
} catch (e) {
context.log.warn(e, `Failed to update branch protection rule on ${branch}`)
}
}
const headers = {
"accept": 'application/vnd.github.hellcat-preview+json,application/vnd.github.luke-cage-preview+json,application/vnd.github.zzzax-preview+json'
}
I am using the above preview header in the request
Expected behavior/code Branch protection rule to be updated appropriately
Environment
- Probot version(s): 9.3.2
- Node/npm version: Node 10.16.0 npm 6.9.0
- OS: OSX 10.14.5
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
github - VSCode Pull Requests - Organization - Stack Overflow
I'm trying to create a pull-request from within VSCode for these Repos, but I get the below error. Is there a setting I'm...
Read more >Unable to Follow Project: (HTTP Error 422) - CircleCI Support
If you're unable to follow a project and see a pop-up error or if, in some instances, nothing happens then please follow these...
Read more >Unable to create github releases: Error: Validation Failed
In this case, the target should be the commit SHA on which the release tag is created. You can specify the branch name...
Read more >Frequently Encountered Orchestrator Errors
This error is occasionally encountered when trying to get assets or queue items during workflow execution. This happens due to a Transport Layer...
Read more >Submit your manifest to the repository - Microsoft Learn
Update the InstallerSha256 in the pull request and try again. Error-Installer-Availability, The validation service was unable to download the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gr2m Yep that works! Thanks so much for the help!
Issue-Label Bot is automatically applying the label
bug 🐞
to this issue, with a confidence of 0.97. Please mark this comment with 👍 or 👎 to give our bot feedback!Links: app homepage, dashboard and code for this bot.