Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

required_approving_review_count is not returned #945

Closed
kevmando opened this issue Jun 18, 2019 · 5 comments

Comments

@kevmando
Copy link

commented Jun 18, 2019

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
@welcome

This comment has been minimized.

Copy link

commented Jun 18, 2019

Thanks for opening this issue. A contributor should be by to give feedback soon. In the meantime, please check out the contributing guidelines and explore other ways you can get involved.

@issue-label-bot issue-label-bot bot added the bug 🐞 label Jun 18, 2019

@issue-label-bot

This comment has been minimized.

Copy link

commented Jun 18, 2019

Issue-Label Bot is automatically applying the label bug 🐞 to this issue, with a confidence of 0.94. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@JasonEtco

This comment has been minimized.

Copy link
Member

commented Jun 19, 2019

Following up from our Slack thread - is it not returned at all, or is it undefined in the object?

@kevmando

This comment has been minimized.

Copy link
Author

commented Jun 19, 2019

@JasonEtco

It seems not at all. undefined may appear since I specified the one for log.

Here is the part of context.github.repos.getBranchProtection debug from Probot.
You can see other 2 - dismiss_stale_reviews and require_code_owner_reviews, but not required_approving_review_count there.

--
  required_pull_request_reviews: {
    "url": "https://GHE.url/api/v3/repos/mine/test-app/branches/develop/protection/required_pull_request_reviews",
    "dismiss_stale_reviews": true,
    "require_code_owner_reviews": true,
    "dismissal_restrictions": {
      "url": "https://GHE.url/api/v3/repos/mine/test-app/branches/develop/protection/dismissal_restrictions",
      "users_url": "https://GHE.url/api/v3/repos/mine/test-app/branches/develop/protection/dismissal_restrictions/users",
      "teams_url": "https://GHE.url/api/v3/repos/mine/test-app/branches/develop/protection/dismissal_restrictions/teams",
      "users": [
        {
          "login": "my-id",
          "id": 6390,
          "node_id": "xxxxxx",
          "avatar_url": "https://GHE.url/avatars/u/6390?",
          "gravatar_id": "",
          "url": "https://GHE.url/api/v3/users/my-id",
          "html_url": "https://GHE.url/my-id",
          "followers_url": "https://GHE.url/api/v3/users/my-id/followers",
          "following_url": "https://GHE.url/api/v3/users/my-id/following{/other_user}",
          "gists_url": "https://GHE.url/api/v3/users/my-id/gists{/gist_id}",
          "starred_url": "https://GHE.url/api/v3/users/my-id/starred{/owner}{/repo}",
          "subscriptions_url": "https://GHE.url/api/v3/users/my-id/subscriptions",
          "organizations_url": "https://GHE.url/api/v3/users/my-id/orgs",
          "repos_url": "https://GHE.url/api/v3/users/my-id/repos",
          "events_url": "https://GHE.url/api/v3/users/my-id/events{/privacy}",
          "received_events_url": "https://GHE.url/api/v3/users/my-id/received_events",
          "type": "User",
          "site_admin": false
        }
      ],
      "teams": [
        {
          "name": "test",
          "id": 11196,
          "node_id": "xxxxxxx",
          "slug": "test",
          "description": "",
          "privacy": "closed",
          "url": "https://GHE.url/api/v3/teams/11196",
          "members_url": "https://GHE.url/api/v3/teams/11196/members{/member}",
          "repositories_url": "https://GHE.url/api/v3/teams/11196/repos",
          "permission": "pull"
        }
      ]
    }
  }
  --
@stale

This comment has been minimized.

Copy link

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.

@stale stale bot added the wontfix label Aug 18, 2019

@stale stale bot closed this Aug 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.