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.

required_approving_review_count is not returned

See original GitHub issue

Bug Report

Current Behavior required_approving_review_count is not returned by context.github.repos.getProtectedBranchPullRequestReviewEnforcement or context.github.repos.getBranchProtection

const settings = await context.github.repos.getBranchProtection(context.repo({branch: 'master'}))

context.log(settings.data)

Expected behavior/code required_approving_review_count is returned a part of branch protection setting - required_pull_request_reviews.

Environment

  • Probot version(s): v7.5.3
  • Node/npm version: Node 10.15.0/npm 6.4.1
  • OS: OSX 10.14.5
  • Github: GHE 2.16.4

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
eoconnorcommented, Mar 30, 2021

Same here.

Never mind. After reading the docs more closely, I realized that you need to include an Accept: application/vnd.github.luke-cage-preview+json request header to see that field.

1reaction
stale[bot]commented, Aug 18, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using GraphQL in a GitHub Action does not return anything for ...
In trying to get the count of required reviews it always returns empty. I have run this exact query in the GitHub GraphQL...
Read more >
Using GraphQL in a GitHub Action does not ... - Stack Overflow
In trying to get the count of required reviews it always returns nothing. I have run this exact query in the GitHub GraphQL...
Read more >
githubCheckBranchProtection - Project "Piper"
requiredApprovingReviewCount ¶. Check if 'Require pull request reviews before merging' option is set with at least the defined number of reviewers in the...
Read more >
Scorecard: clients/githubrepo/branches.go - Fossies
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Go source code syntax highlighting...
Read more >
github - Go Packages
NewDryRunClientWithFields creates a new client that will not perform mutating actions such as setting statuses or commenting, but it will still query GitHub...
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