Skip to content

Make preview comment sticky - #803

Merged
MattiasBuelens merged 3 commits into
prCommentfrom
prComment-sticky
Aug 10, 2026
Merged

Make preview comment sticky#803
MattiasBuelens merged 3 commits into
prCommentfrom
prComment-sticky

Conversation

@MattiasBuelens

@MattiasBuelens MattiasBuelens commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Follow-up on #786: replace the actions/github-script step that calls issues.createComment() (a new comment on every push) with marocchino/sticky-pull-request-comment@v2 using header: pr-preview, so each new deployment updates the same comment.

The message is modelled on rossjrw/pr-preview-action's comment, which this repo used before, e.g.

Documentation preview
🚀 View preview at
https://docs-preview.optiview.dolby.com/pr-786/

<h6>Deployed from commit abc123… at 2026-08-10 12:00 UTC.</h6>

There's no "preview will be ready once the deployment completes" line: the comment is posted after the S3 sync and CloudFront invalidation, so the preview is already live.

_undeploy.yml now updates the same sticky comment to say the preview was removed, then hides it (minimized as outdated). That takes two steps because the action ignores message when hide: true: one step with only_update: true (a no-op if there is no existing comment) and one with hide: true.

The timestamp comes from a small date -u step (the sticky action takes a plain string, not JS). Both jobs get pull-requests: write, the undeploy job gets the app token (and secrets: inherit in pull-request.yml) so the comment is posted by the bot.

Link to Devin session: https://dolby.devinenterprise.com/sessions/5dd3c46c6c65412c8954ba72ef6d43db
Requested by: @MattiasBuelens

Co-Authored-By: Mattias Buelens <mattias.buelens@dolby.com>
@MattiasBuelens
MattiasBuelens requested a review from a team as a code owner August 10, 2026 12:58
@MattiasBuelens
MattiasBuelens requested review from FabienLavocat and jorisfluyt and removed request for a team August 10, 2026 12:58
@MattiasBuelens MattiasBuelens self-assigned this Aug 10, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Co-Authored-By: Mattias Buelens <mattias.buelens@dolby.com>
@theoplayer-bot

This comment has been minimized.

Co-Authored-By: Mattias Buelens <mattias.buelens@dolby.com>
@MattiasBuelens
MattiasBuelens merged commit bcf9850 into main Aug 10, 2026
4 checks passed
@MattiasBuelens
MattiasBuelens deleted the prComment-sticky branch August 10, 2026 15:11
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