feat(api): Add GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs (#37196)

- Add GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs
endpoint, matching the
https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2026-03-10#list-workflow-runs-for-a-workflow

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: bircni <bircni@icloud.com>
This commit is contained in:
bn-zr
2026-06-11 19:12:30 +02:00
committed by GitHub
parent 250a38abb5
commit fefb6f3219
15 changed files with 721 additions and 30 deletions
+4 -1
View File
@@ -23,7 +23,10 @@ func (repo *Repository) GetRefCommitID(name string) (string, error) {
}
refName := plumbing.ReferenceName(name)
if err := refName.Validate(); err != nil {
return "", err
// Match the nogogit behavior: an unresolvable/invalid ref name
// is reported as not-existing rather than a generic validation error,
// so callers can rely on IsErrNotExist regardless of build tag.
return "", ErrNotExist{ID: name}
}
ref, err := repo.gogitRepo.Reference(refName, true)
if err != nil {