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)
| 366 | // |
| 367 | //meta:operation GET /repos/{owner}/{repo}/commits/{ref}/check-suites |
| 368 | func (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. |
| 392 | type AutoTriggerCheck struct { |