CreateStatus creates a new status for 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#create-a-commit-status meta:operation POST /repos/{owner}/{repo}/statuses/{sha}
(ctx context.Context, owner, repo, ref string, status RepoStatus)
| 76 | // |
| 77 | //meta:operation POST /repos/{owner}/{repo}/statuses/{sha} |
| 78 | func (s *RepositoriesService) CreateStatus(ctx context.Context, owner, repo, ref string, status RepoStatus) (*RepoStatus, *Response, error) { |
| 79 | u := fmt.Sprintf("repos/%v/%v/statuses/%v", owner, repo, refURLEscape(ref)) |
| 80 | req, err := s.client.NewRequest(ctx, "POST", u, &status) |
| 81 | if err != nil { |
| 82 | return nil, nil, err |
| 83 | } |
| 84 | |
| 85 | var repoStatus *RepoStatus |
| 86 | resp, err := s.client.Do(req, &repoStatus) |
| 87 | if err != nil { |
| 88 | return nil, resp, err |
| 89 | } |
| 90 | |
| 91 | return repoStatus, resp, nil |
| 92 | } |
| 93 | |
| 94 | // CombinedStatus represents the combined status of a repository at a particular reference. |
| 95 | type CombinedStatus struct { |