From eafcf2dd1fd4c45eca8c48d80669b8256617a873 Mon Sep 17 00:00:00 2001 From: Nicolas Meienberger Date: Sat, 25 Apr 2026 14:51:58 +0200 Subject: [PATCH] ci: include issue to close to copilot instructions --- .../workflows/request-docs-version-update.yml | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/request-docs-version-update.yml b/.github/workflows/request-docs-version-update.yml index 69b5b48a..2bd53c38 100644 --- a/.github/workflows/request-docs-version-update.yml +++ b/.github/workflows/request-docs-version-update.yml @@ -48,7 +48,7 @@ jobs: const targetRepo = `${owner}/${repo}`; const releaseUrl = `https://github.com/${targetRepo}/releases/tag/${releaseTag}`; const title = `Update Docker Compose examples to ${releaseTag}`; - const body = [ + const bodyLines = [ `A new Zerobyte release was published: ${releaseTag}`, "", `Release: ${releaseUrl}`, @@ -70,13 +70,32 @@ jobs: "", "- Search for stale `ghcr.io/nicotsx/zerobyte:v...` references in `README.md` and `apps/docs/`.", "- Run any formatting or documentation checks that are appropriate for the touched files.", - ].join("\n"); + ]; - await github.request("POST /repos/{owner}/{repo}/issues", { + const issue = await github.rest.issues.create({ owner, repo, title, - body, + body: bodyLines.join("\n"), + }); + + await github.rest.issues.update({ + owner, + repo, + issue_number: issue.data.number, + body: [ + ...bodyLines, + "", + "Pull request requirement:", + "", + `- Include \`Closes #${issue.data.number}\` in the pull request body.`, + ].join("\n"), + }); + + await github.request("POST /repos/{owner}/{repo}/issues/{issue_number}/assignees", { + owner, + repo, + issue_number: issue.data.number, assignees: ["copilot-swe-agent[bot]"], agent_assignment: { target_repo: targetRepo,