From aa7dffe593a6bba76ef23ed0d19a7900e16bd58d Mon Sep 17 00:00:00 2001 From: Roo Code Date: Tue, 10 Feb 2026 17:25:48 +0000 Subject: [PATCH 1/3] feat: add PR workflow to build regular and nightly VSIX artifacts This file should be moved to .github/workflows/pr-build.yml The roomote bot token lacks the workflows permission to push directly to .github/workflows/. --- .github/pr-build.yml | 145 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 .github/pr-build.yml diff --git a/.github/pr-build.yml b/.github/pr-build.yml new file mode 100644 index 00000000000..e8c27842836 --- /dev/null +++ b/.github/pr-build.yml @@ -0,0 +1,145 @@ +name: PR Build VSIX + +on: + pull_request: + types: [opened, reopened, ready_for_review, synchronize] + branches: [main] + +# Cancel in-flight builds for the same PR when a new push arrives. +concurrency: + group: pr-build-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + build-regular: + name: Build Regular VSIX + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js and pnpm + uses: ./.github/actions/setup-node-pnpm + with: + install-args: '--frozen-lockfile' + + - name: Build VSIX + run: pnpm vsix + + - name: Determine VSIX filename + id: vsix + run: | + VSIX_FILE=$(ls bin/*.vsix | head -n1) + VSIX_NAME=$(basename "$VSIX_FILE") + echo "file=$VSIX_FILE" >> "$GITHUB_OUTPUT" + echo "name=$VSIX_NAME" >> "$GITHUB_OUTPUT" + + - name: Upload Regular VSIX + uses: actions/upload-artifact@v4 + with: + name: roo-code-regular + path: bin/*.vsix + retention-days: 14 + + build-nightly: + name: Build Nightly VSIX + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node.js and pnpm + uses: ./.github/actions/setup-node-pnpm + with: + install-args: '--frozen-lockfile' + + - name: Forge numeric Nightly version + id: version + env: + RUN_NUMBER: ${{ github.run_number }} + run: echo "number=$(( 5500 + ${RUN_NUMBER} ))" >> "$GITHUB_OUTPUT" + + - name: Patch package.json version + env: + VERSION_NUMBER: ${{ steps.version.outputs.number }} + run: | + node <<'EOF' + const fs = require('fs'); + const path = require('path'); + const pkgPath = path.join(__dirname, 'apps', 'vscode-nightly', 'package.nightly.json'); + const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8')); + const [maj, min] = pkg.version.split('.'); + pkg.version = `${maj}.${min}.${process.env.VERSION_NUMBER}`; + fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2)); + console.log(`Nightly version set to ${pkg.version}`); + EOF + + - name: Build Nightly VSIX + run: pnpm vsix:nightly + + - name: Upload Nightly VSIX + uses: actions/upload-artifact@v4 + with: + name: roo-code-nightly + path: bin/*.vsix + retention-days: 14 + + comment: + name: Post PR Comment + runs-on: ubuntu-latest + needs: [build-regular, build-nightly] + permissions: + pull-requests: write + steps: + - name: Post or update PR comment with build links + uses: actions/github-script@v7 + with: + script: | + const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`; + const sha = context.payload.pull_request.head.sha.substring(0, 7); + + const body = [ + `### VSIX Build Artifacts`, + ``, + `Build artifacts for commit \`${sha}\` are ready for review:`, + ``, + `| Variant | Artifact |`, + `|---------|----------|`, + `| **Regular** | \`roo-code-regular\` |`, + `| **Nightly** | \`roo-code-nightly\` |`, + ``, + `[Download artifacts from this workflow run](${runUrl}#artifacts)`, + ``, + `> Install with: \`code --install-extension path/to/file.vsix\``, + ].join('\n'); + + // Look for an existing comment from this workflow so we update + // instead of creating a new one on every push. + const marker = '### VSIX Build Artifacts'; + const { data: comments } = await github.rest.issues.listComments({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + }); + + const existing = comments.find( + (c) => c.user.type === 'Bot' && c.body.startsWith(marker), + ); + + if (existing) { + await github.rest.issues.updateComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: existing.id, + body, + }); + } else { + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body, + }); + } From 236deb5ffbba940472053756bf2f7dd837c21348 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Tue, 10 Feb 2026 17:28:11 +0000 Subject: [PATCH 2/3] fix: rename regular artifact from roo-code-regular to roo-code --- .github/pr-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/pr-build.yml b/.github/pr-build.yml index e8c27842836..a0179311a71 100644 --- a/.github/pr-build.yml +++ b/.github/pr-build.yml @@ -37,7 +37,7 @@ jobs: - name: Upload Regular VSIX uses: actions/upload-artifact@v4 with: - name: roo-code-regular + name: roo-code path: bin/*.vsix retention-days: 14 @@ -107,7 +107,7 @@ jobs: ``, `| Variant | Artifact |`, `|---------|----------|`, - `| **Regular** | \`roo-code-regular\` |`, + `| **Regular** | \`roo-code\` |`, `| **Nightly** | \`roo-code-nightly\` |`, ``, `[Download artifacts from this workflow run](${runUrl}#artifacts)`, From 273203e412958ef3b8447c6bf6f92808a6435a3a Mon Sep 17 00:00:00 2001 From: Roo Code Date: Tue, 10 Feb 2026 18:35:24 +0000 Subject: [PATCH 3/3] fix: remove dead step and paginate comment listing - Remove unused "Determine VSIX filename" step whose outputs were never consumed - Replace listComments with github.paginate to handle PRs with 30+ comments --- .github/pr-build.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/pr-build.yml b/.github/pr-build.yml index a0179311a71..0ae4350d3c1 100644 --- a/.github/pr-build.yml +++ b/.github/pr-build.yml @@ -26,14 +26,6 @@ jobs: - name: Build VSIX run: pnpm vsix - - name: Determine VSIX filename - id: vsix - run: | - VSIX_FILE=$(ls bin/*.vsix | head -n1) - VSIX_NAME=$(basename "$VSIX_FILE") - echo "file=$VSIX_FILE" >> "$GITHUB_OUTPUT" - echo "name=$VSIX_NAME" >> "$GITHUB_OUTPUT" - - name: Upload Regular VSIX uses: actions/upload-artifact@v4 with: @@ -118,10 +110,11 @@ jobs: // Look for an existing comment from this workflow so we update // instead of creating a new one on every push. const marker = '### VSIX Build Artifacts'; - const { data: comments } = await github.rest.issues.listComments({ + const comments = await github.paginate(github.rest.issues.listComments, { owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number, + per_page: 100, }); const existing = comments.find(