(t *testing.T)
| 581 | } |
| 582 | |
| 583 | func TestBuildOrgUpdateIssue(t *testing.T) { |
| 584 | title, body := buildOrgUpdateIssue(orgRepoPreview{ |
| 585 | Repo: "octo/repo", |
| 586 | Workflows: []orgWorkflowPreview{ |
| 587 | {Name: "repo-assist", CurrentRef: "1111111", LatestRef: "2222222"}, |
| 588 | }, |
| 589 | }, "v1.2.3", "https://github.com/github/gh-aw/releases/tag/v1.2.3", "<!-- gh-aw-update: v1.2.3 -->") |
| 590 | |
| 591 | assert.Equal(t, "[aw] Updates available", title) |
| 592 | assert.Contains(t, body, "## Agentic Workflows Update Available") |
| 593 | assert.Contains(t, body, "- `repo-assist`: `1111111` -> `2222222`") |
| 594 | assert.Contains(t, body, "Assign this issue to Copilot") |
| 595 | assert.Contains(t, body, "@copilot update agentic workflows") |
| 596 | assert.Contains(t, body, "Run `gh aw update`") |
| 597 | assert.Contains(t, body, "<!-- gh-aw-update: v1.2.3 -->") |
| 598 | assert.Contains(t, body, "https://github.com/github/gh-aw/releases/tag/v1.2.3") |
| 599 | } |
| 600 | |
| 601 | func TestBuildOrgUpdateIssueNoRelease(t *testing.T) { |
| 602 | _, body := buildOrgUpdateIssue(orgRepoPreview{ |
nothing calls this directly
no test coverage detected