Skip to content

ci: post sticky PR comment with .mcpb build link#129

Open
vasylenko wants to merge 5 commits into
mainfrom
vasylenko/ci-pr-build-comment
Open

ci: post sticky PR comment with .mcpb build link#129
vasylenko wants to merge 5 commits into
mainfrom
vasylenko/ci-pr-build-comment

Conversation

@vasylenko
Copy link
Copy Markdown
Owner

Summary

  • On every PR push, posts (or updates in place) a single sticky comment on the PR with a direct download link to the freshly-built .mcpb, plus version, short SHA, and run link.
  • Comment is identified by a hidden HTML marker so subsequent pushes update the same comment rather than appending new ones.

Why

Before this, grabbing a PR build meant clicking into the Actions tab, finding the run, and scrolling to the artifacts list. This makes the link one click from the PR conversation.

This PR is its own test fixture: after it lands as an open PR, the workflow on this branch's head runs against itself. Expected behavior on a second push is the same comment ID updated in place (updated_at > created_at, count of marker-tagged bot comments stays at 1).

--

Adds a step to build-bundle-pr.yml that posts (or updates on subsequent
pushes) a single comment on the PR with a download link to the freshly
built .mcpb bundle, the build version, short SHA, and run link. Identity
is anchored by an HTML-comment marker so the comment is durable across
pushes and never duplicates.

Uses only the pre-installed gh CLI on ubuntu-latest — no third-party
actions. Permissions widened by exactly pull-requests: write.
Copilot AI review requested due to automatic review settings May 18, 2026 21:07
@vercel
Copy link
Copy Markdown

vercel Bot commented May 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bear-notes-mcp Ready Ready Preview, Comment May 18, 2026 11:04pm

@vasylenko
Copy link
Copy Markdown
Owner Author

vasylenko commented May 18, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 18, 2026

MCPB build for this PR

Field Value
Bundle Download .mcpb
Version 3.0.1-pr.129.22
Commit 00a390e
Run #26065556793

Artifact retained 14 days. This comment auto-updates on each push.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a CI step that posts a single sticky comment on each PR with a download link to the freshly-built .mcpb artifact, version, short SHA, and run link. The comment is anchored by an HTML-comment marker so subsequent pushes update the same comment rather than creating new ones.

Changes:

  • Grants pull-requests: write to the build job and gives the upload step an id so its artifact-url output can be referenced.
  • Adds a "Post or update PR build comment" step that builds a Markdown body from env-injected values and uses gh api to either PATCH an existing marker-tagged comment or POST a new one.

Comment thread .github/workflows/build-bundle-pr.yml
Empty commit to exercise the PATCH branch of the new Post or update PR
build comment step. Will be amended out or kept in the merge depending
on review; safe to drop.
Fork-origin pull_request runs get a read-only GITHUB_TOKEN regardless of
the permissions: block, so the comment step would 403 and paint a red x
on every external-contributor PR. Guard the step with a same-repo check;
artifact link stays reachable from the Actions run page.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings May 18, 2026 23:04
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants