Skip to content

feat: add Vercel-style PR comment for deployment status#5295

Draft
Flo4604 wants to merge 2 commits intographite-base/5295from
feat/pr-deployment-comment
Draft

feat: add Vercel-style PR comment for deployment status#5295
Flo4604 wants to merge 2 commits intographite-base/5295from
feat/pr-deployment-comment

Conversation

@Flo4604
Copy link
Member

@Flo4604 Flo4604 commented Mar 12, 2026

What does this PR do?

Adds PR comment deployment status reporting alongside existing GitHub commit status reporting. When deployments run for pull requests, a shared comment is created or updated with a table showing deployment status for each app/environment combination, similar to Vercel's deployment comments.

The implementation includes:

  • A new prCommentReporter that manages PR deployment comments with markdown tables
  • A compositeStatusReporter that fans out status updates to multiple reporters (GitHub commit status + PR comments)
  • GitHub API client methods for finding PRs by branch, creating/updating issue comments, and searching for existing bot comments
  • Automatic row management where each deployment gets its own table row identified by app/environment markers

Fixes # (issue)

Shows a nice comment on the stuff we deployed or failed!
CleanShot 2026-03-12 at 16.59.10.png

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Enhancement (small improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How should this be tested?

  • Create a pull request with deployment configuration
  • Trigger a deployment workflow for the PR
  • Verify that a deployment comment is created on the PR with the correct table format
  • Run multiple deployments for different apps/environments on the same PR
  • Confirm that each deployment gets its own row in the shared comment
  • Test deployment status updates (queued → building → success/failure) and verify the comment rows update accordingly

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read Contributing Guide
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand areas
  • Ran pnpm build
  • Ran pnpm fmt
  • Ran make fmt on /go directory
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the Unkey Docs if changes were necessary

@vercel
Copy link

vercel bot commented Mar 12, 2026

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

Project Deployment Actions Updated (UTC)
dashboard Ready Ready Preview, Comment Mar 17, 2026 5:32pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 12, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 936ccafb-ed7e-4c8e-9b8e-ab42210083ba

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/pr-deployment-comment
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Member Author

Flo4604 commented Mar 12, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Flo4604 Flo4604 force-pushed the feat/deployment-approval-ui branch from 1f59d61 to a0f9eb8 Compare March 12, 2026 17:14
@Flo4604 Flo4604 force-pushed the feat/pr-deployment-comment branch from 7bcd633 to 3ded3ce Compare March 12, 2026 17:14
@Flo4604 Flo4604 force-pushed the feat/deployment-approval-ui branch from a0f9eb8 to fdc18b3 Compare March 13, 2026 13:44
@Flo4604 Flo4604 force-pushed the feat/pr-deployment-comment branch from 3ded3ce to b0fd3be Compare March 13, 2026 13:44
@Flo4604 Flo4604 force-pushed the feat/pr-deployment-comment branch from b0fd3be to a0effc8 Compare March 13, 2026 13:59
@Flo4604 Flo4604 force-pushed the feat/deployment-approval-ui branch from fdc18b3 to 5e195ef Compare March 13, 2026 13:59
@Flo4604 Flo4604 force-pushed the feat/pr-deployment-comment branch from a0effc8 to 2c18337 Compare March 13, 2026 14:34
@Flo4604 Flo4604 force-pushed the feat/deployment-approval-ui branch from 764db6e to 1ce4525 Compare March 13, 2026 14:34
@Flo4604 Flo4604 force-pushed the feat/deployment-approval-ui branch from 5c41b85 to 4df0fab Compare March 16, 2026 11:24
@Flo4604 Flo4604 force-pushed the feat/pr-deployment-comment branch from 2c18337 to 468c209 Compare March 16, 2026 11:24
@Flo4604 Flo4604 force-pushed the feat/pr-deployment-comment branch from 468c209 to dc1627b Compare March 16, 2026 11:31
@Flo4604 Flo4604 force-pushed the feat/deployment-approval-ui branch from 4df0fab to 943b341 Compare March 16, 2026 11:31
@Flo4604 Flo4604 force-pushed the feat/pr-deployment-comment branch from dc1627b to 3e055d9 Compare March 16, 2026 11:52
@Flo4604 Flo4604 force-pushed the feat/deployment-approval-ui branch from 01db7ed to 36a3aed Compare March 16, 2026 11:52
Base automatically changed from feat/deployment-approval-ui to feat/external-contributor-protection March 16, 2026 11:58
@Flo4604 Flo4604 force-pushed the feat/pr-deployment-comment branch from 3e055d9 to d8f659b Compare March 16, 2026 12:00
@Flo4604 Flo4604 force-pushed the feat/external-contributor-protection branch from b97c021 to 4ea5d2e Compare March 16, 2026 12:05
@Flo4604 Flo4604 changed the base branch from feat/external-contributor-protection to graphite-base/5295 March 16, 2026 12:35
@Flo4604 Flo4604 force-pushed the feat/pr-deployment-comment branch from d8f659b to d46bf71 Compare March 16, 2026 14:18
@Flo4604 Flo4604 force-pushed the graphite-base/5295 branch from b97c021 to 95a967f Compare March 16, 2026 14:18
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.

1 participant