GetCombinedStatus returns the combined status of a repository at the specified reference. The ref can be a SHA, a branch name, or a tag name. GitHub API docs: https://docs.github.com/rest/commits/statuses?apiVersion=2022-11-28#get-the-combined-status-for-a-specific-reference meta:operation GET /re
(ctx context.Context, owner, repo, ref string, opts *ListOptions)
| 117 | // |
| 118 | //meta:operation GET /repos/{owner}/{repo}/commits/{ref}/status |
| 119 | func (s *RepositoriesService) GetCombinedStatus(ctx context.Context, owner, repo, ref string, opts *ListOptions) (*CombinedStatus, *Response, error) { |
| 120 | u := fmt.Sprintf("repos/%v/%v/commits/%v/status", owner, repo, refURLEscape(ref)) |
| 121 | u, err := addOptions(u, opts) |
| 122 | if err != nil { |
| 123 | return nil, nil, err |
| 124 | } |
| 125 | |
| 126 | req, err := s.client.NewRequest(ctx, "GET", u, nil) |
| 127 | if err != nil { |
| 128 | return nil, nil, err |
| 129 | } |
| 130 | |
| 131 | var status *CombinedStatus |
| 132 | resp, err := s.client.Do(req, &status) |
| 133 | if err != nil { |
| 134 | return nil, resp, err |
| 135 | } |
| 136 | |
| 137 | return status, resp, nil |
| 138 | } |