Skip to content

Commit

Permalink
missing protected_branches#deploy_key_id
Browse files Browse the repository at this point in the history
  • Loading branch information
seyguai committed Oct 14, 2024
1 parent b5e0812 commit 6fc3006
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
1 change: 1 addition & 0 deletions protected_branches.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ type BranchAccessDescription struct {
AccessLevelDescription string `json:"access_level_description"`
UserID int `json:"user_id"`
GroupID int `json:"group_id"`
DeployKeyID int `json:"deploy_key_id"`
}

// ListProtectedBranchesOptions represents the available ListProtectedBranches()
Expand Down
23 changes: 21 additions & 2 deletions protected_branches_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,31 @@ func TestListProtectedBranches(t *testing.T) {
"push_access_levels":[{
"id":1,
"access_level":40,
"access_level_description":"Maintainers"
"access_level_description":"Maintainers",
"deploy_key_id":null,
"user_id":null,
"group_id":null
},{
"id":2,
"access_level":30,
"access_level_description":"User name",
"deploy_key_id":null,
"user_id":123,
"group_id":null
},{
"id":3,
"access_level":40,
"access_level_description":"deploy key",
"deploy_key_id":456,
"user_id":null,
"group_id":null
}],
"merge_access_levels":[{
"id":1,
"access_level":40,
"access_level_description":"Maintainers"
"access_level_description":"Maintainers",
"user_id":null,
"group_id":null
}],
"code_owner_approval_required":false
}
Expand Down

0 comments on commit 6fc3006

Please sign in to comment.