question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HttpError: Validation Failed on trying to update branch protection

See original GitHub issue

Bug 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:closed
  • Created 4 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
denangelovcommented, Sep 9, 2019

@gr2m Yep that works! Thanks so much for the help!

1reaction
issue-label-bot[bot]commented, Sep 6, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found