forked from OpsLevel/opslevel-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck_git_branch_protection.go
33 lines (28 loc) · 1017 Bytes
/
check_git_branch_protection.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package opslevel
type GitBranchProtectionCheckFragment struct{}
type CheckGitBranchProtectionCreateInput struct {
CheckCreateInput
}
type CheckGitBranchProtectionUpdateInput struct {
CheckUpdateInput
}
func (client *Client) CreateCheckGitBranchProtection(input CheckGitBranchProtectionCreateInput) (*Check, error) {
var m struct {
Payload CheckResponsePayload `graphql:"checkGitBranchProtectionCreate(input: $input)"`
}
v := PayloadVariables{
"input": input,
}
err := client.Mutate(&m, v, WithName("CheckGitBranchProtectionCreate"))
return &m.Payload.Check, HandleErrors(err, m.Payload.Errors)
}
func (client *Client) UpdateCheckGitBranchProtection(input CheckGitBranchProtectionUpdateInput) (*Check, error) {
var m struct {
Payload CheckResponsePayload `graphql:"checkGitBranchProtectionUpdate(input: $input)"`
}
v := PayloadVariables{
"input": input,
}
err := client.Mutate(&m, v, WithName("CheckGitBranchProtectionUpdate"))
return &m.Payload.Check, HandleErrors(err, m.Payload.Errors)
}