Skip to content

Missed required_conversation_resolution field in branch protection rules #1945

Closed
@g4s8

Description

@g4s8

GitHub added a new option for branch protection rules: Require conversation resolution before merging, v3 API also includes this new field as required_conversation_resolution (see example below). But current version (v36) of go-github doesn't include this field in protection struct.

Example API call:

{
  "url": "https://api.github.com/repos/g4s8/gitstrap/branches/master/protection", 
  "required_status_checks": {
    "url": "https://api.github.com/repos/g4s8/gitstrap/branches/master/protection/required_status_checks",
    "strict": true,
    "contexts": [
      "build",
      "lint",
      "test"
    ],
    "contexts_url": "https://api.github.com/repos/g4s8/gitstrap/branches/master/protection/required_status_checks/contexts"
  },
  "required_pull_request_reviews": {
    "url": "https://api.github.com/repos/g4s8/gitstrap/branches/master/protection/required_pull_request_reviews",
    "dismiss_stale_reviews": true,
    "require_code_owner_reviews": false,
    "required_approving_review_count": 1
  },
  "enforce_admins": {
    "url": "https://api.github.com/repos/g4s8/gitstrap/branches/master/protection/enforce_admins",
    "enabled": false
  },
  "required_linear_history": {
    "enabled": true
  },
  "allow_force_pushes": {
    "enabled": false
  },
  "allow_deletions": {
    "enabled": false
  },
  "required_conversation_resolution": {
    "enabled": false
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions