ListCheckRunsForRef lists check runs 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: h
(ctx context.Context, owner, repo, ref string, opts *ListCheckRunsOptions)
| 276 | // |
| 277 | //meta:operation GET /repos/{owner}/{repo}/commits/{ref}/check-runs |
| 278 | func (s *ChecksService) ListCheckRunsForRef(ctx context.Context, owner, repo, ref string, opts *ListCheckRunsOptions) (*ListCheckRunsResults, *Response, error) { |
| 279 | u := fmt.Sprintf("repos/%v/%v/commits/%v/check-runs", owner, repo, refURLEscape(ref)) |
| 280 | u, err := addOptions(u, opts) |
| 281 | if err != nil { |
| 282 | return nil, nil, err |
| 283 | } |
| 284 | |
| 285 | req, err := s.client.NewRequest(ctx, "GET", u, nil) |
| 286 | if err != nil { |
| 287 | return nil, nil, err |
| 288 | } |
| 289 | |
| 290 | req.Header.Set("Accept", mediaTypeCheckRunsPreview) |
| 291 | |
| 292 | var checkRunResults *ListCheckRunsResults |
| 293 | resp, err := s.client.Do(req, &checkRunResults) |
| 294 | if err != nil { |
| 295 | return nil, resp, err |
| 296 | } |
| 297 | |
| 298 | return checkRunResults, resp, nil |
| 299 | } |
| 300 | |
| 301 | // ListCheckRunsCheckSuite lists check runs for a check suite. |
| 302 | // |