(t *testing.T, reg *httpmock.Registry, owner, repoName, tagName, sha string)
| 327 | } |
| 328 | |
| 329 | func StubFetchRefSHA(t *testing.T, reg *httpmock.Registry, owner, repoName, tagName, sha string) { |
| 330 | path := fmt.Sprintf("repos/%s/%s/git/ref/tags%%2F%s", owner, repoName, tagName) |
| 331 | reg.Register( |
| 332 | httpmock.REST("GET", path), |
| 333 | httpmock.StringResponse(fmt.Sprintf(`{"object": {"sha": "%s"}}`, sha)), |
| 334 | ) |
| 335 | } |