MCPcopy Index your code
hub / github.com/google/go-github / ListCheckSuitesForRef

Method ListCheckSuitesForRef

github/checks.go:368–389  ·  view source on GitHub ↗

ListCheckSuitesForRef lists check suite for a specific ref. The ref can be a commit SHA, branch name `heads/ `, or tag name `tags/ `. For more information, see "Git References" in the Git documentation https://git-scm.com/book/en/v2/Git-Internals-Git-References. GitHub API docs

(ctx context.Context, owner, repo, ref string, opts *ListCheckSuiteOptions)

Source from the content-addressed store, hash-verified

366//
367//meta:operation GET /repos/{owner}/{repo}/commits/{ref}/check-suites
368func (s *ChecksService) ListCheckSuitesForRef(ctx context.Context, owner, repo, ref string, opts *ListCheckSuiteOptions) (*ListCheckSuiteResults, *Response, error) {
369 u := fmt.Sprintf("repos/%v/%v/commits/%v/check-suites", owner, repo, refURLEscape(ref))
370 u, err := addOptions(u, opts)
371 if err != nil {
372 return nil, nil, err
373 }
374
375 req, err := s.client.NewRequest(ctx, "GET", u, nil)
376 if err != nil {
377 return nil, nil, err
378 }
379
380 req.Header.Set("Accept", mediaTypeCheckRunsPreview)
381
382 var checkSuiteResults *ListCheckSuiteResults
383 resp, err := s.client.Do(req, &checkSuiteResults)
384 if err != nil {
385 return nil, resp, err
386 }
387
388 return checkSuiteResults, resp, nil
389}
390
391// AutoTriggerCheck enables or disables automatic creation of CheckSuite events upon pushes to the repository.
392type AutoTriggerCheck struct {

Calls 4

refURLEscapeFunction · 0.85
addOptionsFunction · 0.85
NewRequestMethod · 0.80
DoMethod · 0.45

Tested by 1