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

[BUG]: BranchProtectionSettingsUpdate type is missing a bool property for RequiredSignatures. #2855

Closed
1 task done
WesBossPro opened this issue Jan 18, 2024 · 2 comments · Fixed by #2873
Closed
1 task done
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Feature New feature or request

Comments

@WesBossPro
Copy link

What happened?

There is no options to set required_signatures to true or false with the BranchProtectionSettingsUpdate.

{
  "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection",
  "required_status_checks": {
    "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks",
    "strict": true,
    "contexts": [
      "continuous-integration/travis-ci"
    ],
    "contexts_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts",
    "checks": [
      {
        "context": "continuous-integration/travis-ci",
        "app_id": null
      }
    ]
  },
  "restrictions": {
    "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions",
    "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users",
    "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams",
    "apps_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps",
    "users": [],
    "teams": [],
    "apps": []
  },
  "required_pull_request_reviews": {
    "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews",
    "dismiss_stale_reviews": true,
    "require_code_owner_reviews": true,
    "required_approving_review_count": 2,
    "require_last_push_approval": true,
    "dismissal_restrictions": {
      "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions",
      "users_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users",
      "teams_url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams",
      "users": [],
      "teams": [],
      "apps": []
    }
  },
  "required_signatures": {
    "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures",
    "enabled": false
  },
  "enforce_admins": {
    "url": "https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins",
    "enabled": true
  },
  "required_linear_history": {
    "enabled": true
  },
  "allow_force_pushes": {
    "enabled": true
  },
  "allow_deletions": {
    "enabled": true
  },
  "block_creations": {
    "enabled": true
  },
  "required_conversation_resolution": {
    "enabled": true
  },
  "lock_branch": {
    "enabled": true
  },
  "allow_fork_syncing": {
    "enabled": true
  }
}

(the above example is located here)

Versions

Octokit.net 9.1.0

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@WesBossPro WesBossPro added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Jan 18, 2024
@nickfloyd nickfloyd added Status: Up for grabs Issues that are ready to be worked on by anyone Type: Feature New feature or request and removed Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Jan 19, 2024
@nickfloyd
Copy link
Contributor

Hey @WesBossPro thanks for letting us know about this need! ❤️ Let us know if you'd be interested coming up with a way to address it and then submitting a PR to be reviewed. For now I have labeled this as "Up For Grabs" so that the community knows that it's available as well.

@wesdevpro
Copy link
Contributor

Hey @WesBossPro thanks for letting us know about this need! ❤️ Let us know if you'd be interested coming up with a way to address it and then submitting a PR to be reviewed. For now I have labeled this as "Up For Grabs" so that the community knows that it's available as well.

@nickfloyd No problem. I will attempt to take this issue on in my free time here on my main account. I already started some development last night.

kfcampbell pushed a commit that referenced this issue Feb 5, 2024
… Type (#2873)

* fix: added `RequiredSignatures` to the `BranchProtectionSettingsUpdate` types.

- Fixes #2855
- Updated `BranchProtectionSettingsUpdate` by adding `RequiredSignatures`.
- Update all integration `xUnit` tests to check for the `RequiredSignatures` property.

* docs: add comment documenting the `RequiredSignatures` property
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Up for grabs Issues that are ready to be worked on by anyone Type: Feature New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants