MCPcopy Create free account
hub / github.com/github/gh-aw / TestResolveItemRepo

Function TestResolveItemRepo

pkg/cli/outcome_eval_test.go:151–160  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

149}
150
151func TestResolveItemRepo(t *testing.T) {
152 item := CreatedItemReport{Repo: "explicit/repo"}
153 assert.Equal(t, "explicit/repo", resolveItemRepo(item, "fallback/repo"), "prefers item repo")
154
155 item2 := CreatedItemReport{URL: "https://github.com/url/repo/pull/1"}
156 assert.Equal(t, "url/repo", resolveItemRepo(item2, "fallback/repo"), "falls back to URL repo")
157
158 item3 := CreatedItemReport{}
159 assert.Equal(t, "fallback/repo", resolveItemRepo(item3, "fallback/repo"), "falls back to override")
160}
161
162func TestResolveItemNumber(t *testing.T) {
163 item := CreatedItemReport{Number: 42}

Callers

nothing calls this directly

Calls 1

resolveItemRepoFunction · 0.85

Tested by

no test coverage detected