From 882391a5b0578abcb3dd7ecd7e07d12ae6a7a5bc Mon Sep 17 00:00:00 2001 From: David Nguyen Date: Sat, 27 Jun 2026 16:42:04 +0700 Subject: [PATCH 1/2] Add artifact download links to CI comments --- .github/workflows/ci.yml | 49 ++++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f3af61..cdee9e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,7 @@ on: workflow_dispatch: permissions: + actions: read contents: read issues: write pull-requests: write @@ -64,6 +65,9 @@ jobs: - name: Install frontend dependencies run: npm ci + - name: Typecheck frontend + run: npm run typecheck + - name: Build frontend run: npm run build @@ -93,21 +97,40 @@ jobs: with: script: | const marker = ''; - const body = [ - marker, - '### GitPilot build artifacts are ready', - '', - 'Download the desktop builds from this workflow run\'s artifacts:', - '', - '- Windows: `gitpilot-windows`', - '- macOS: `gitpilot-macos`', - '- Linux: `gitpilot-linux`', - ].join('\n'); - const { owner, repo } = context.repo; const issue_number = context.issue.number; + const runUrl = `${context.serverUrl}/${owner}/${repo}/actions/runs/${context.runId}`; + const artifactNames = ['gitpilot-windows', 'gitpilot-macos', 'gitpilot-linux']; try { + const artifacts = await github.paginate(github.rest.actions.listWorkflowRunArtifacts, { + owner, + repo, + run_id: context.runId, + per_page: 100, + }); + const artifactByName = new Map(artifacts.map((artifact) => [artifact.name, artifact])); + const artifactLines = artifactNames.map((name) => { + const artifact = artifactByName.get(name); + const label = name.replace('gitpilot-', ''); + if (!artifact) { + return `- ${label}: \`${name}\` (open [workflow run](${runUrl}) to download)`; + } + const artifactUrl = `${runUrl}/artifacts/${artifact.id}`; + return `- ${label}: [\`${name}\`](${artifactUrl})`; + }); + + const body = [ + marker, + '### GitPilot build artifacts are ready', + '', + `One CI workflow run built all 3 desktop apps: [open workflow run](${runUrl}).`, + '', + 'Download links:', + '', + ...artifactLines, + ].join('\n'); + const comments = await github.paginate(github.rest.issues.listComments, { owner, repo, @@ -154,7 +177,9 @@ jobs: echo echo "This workflow builds GitPilot on Linux, Windows, and macOS and uploads the desktop bundles as artifacts." echo - echo "Artifacts:" + echo "Workflow run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + echo + echo "Download artifacts from that run:" echo "- gitpilot-linux" echo "- gitpilot-windows" echo "- gitpilot-macos" From 041e83dceebde7b38fb1b8cfdd0bb33b823c13b6 Mon Sep 17 00:00:00 2001 From: David Nguyen Date: Sat, 27 Jun 2026 16:56:20 +0700 Subject: [PATCH 2/2] Fix npm lockfile and artifact download links --- package-lock.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/package-lock.json b/package-lock.json index d24dd38..d42b1ce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1777,6 +1777,19 @@ "url": "https://github.com/sponsors/rawify" } }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "dev": true,