| 340 | } |
| 341 | |
| 342 | func buildOrgUpdateIssue(preview orgRepoPreview, releaseTag, releaseURL, xmlMarker string) (string, string) { |
| 343 | title := "[aw] Updates available" |
| 344 | |
| 345 | var body strings.Builder |
| 346 | body.WriteString("## Agentic Workflows Update Available\n\n") |
| 347 | body.WriteString("The `gh aw update` command found source-managed workflow updates for this repository.\n\n") |
| 348 | body.WriteString("**Workflows with updates:**\n\n") |
| 349 | for _, wf := range preview.Workflows { |
| 350 | // CurrentRef and LatestRef are already resolved to version labels. |
| 351 | fmt.Fprintf(&body, "- `%s`: `%s` -> `%s`\n", wf.Name, wf.CurrentRef, wf.LatestRef) |
| 352 | } |
| 353 | if releaseURL != "" { |
| 354 | fmt.Fprintf(&body, "\n[View gh-aw release %s](%s)\n", releaseTag, releaseURL) |
| 355 | } |
| 356 | body.WriteString("\n### How to execute\n\n") |
| 357 | body.WriteString("- **Assign to agent**: Assign this issue to Copilot to automatically apply the update\n") |
| 358 | body.WriteString("- **Via @copilot comment**: Add a comment `@copilot update agentic workflows` on this issue\n") |
| 359 | body.WriteString("- **Via CLI**: Run `gh aw update` in your local checkout\n\n") |
| 360 | body.WriteString(xmlMarker + "\n") |
| 361 | |
| 362 | return title, body.String() |
| 363 | } |