-
Notifications
You must be signed in to change notification settings - Fork 13
/
check_repo_search.go
28 lines (25 loc) · 1.05 KB
/
check_repo_search.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
package opslevel
type RepositorySearchCheckFragment struct {
FileContentsPredicate Predicate `graphql:"fileContentsPredicate"` // Condition to match the text content.
FileExtensions []string `graphql:"fileExtensions"` // Restrict the search to files of given extensions.
}
func (client *Client) CreateCheckRepositorySearch(input CheckRepositorySearchCreateInput) (*Check, error) {
var m struct {
Payload CheckResponsePayload `graphql:"checkRepositorySearchCreate(input: $input)"`
}
v := PayloadVariables{
"input": input,
}
err := client.Mutate(&m, v, WithName("CheckRepositorySearchCreate"))
return &m.Payload.Check, HandleErrors(err, m.Payload.Errors)
}
func (client *Client) UpdateCheckRepositorySearch(input CheckRepositorySearchUpdateInput) (*Check, error) {
var m struct {
Payload CheckResponsePayload `graphql:"checkRepositorySearchUpdate(input: $input)"`
}
v := PayloadVariables{
"input": input,
}
err := client.Mutate(&m, v, WithName("CheckRepositorySearchUpdate"))
return &m.Payload.Check, HandleErrors(err, m.Payload.Errors)
}