feat(github): Add comment option to changelog-preview workflow#722
Merged
feat(github): Add comment option to changelog-preview workflow#722
Conversation
Add a `comment` input to the changelog-preview workflow that allows users to choose between posting PR comments (default) or creating check runs with job summaries. When `comment: false`: - Creates a neutral check run named "Changelog" with the semver impact - Includes full changelog preview in the check run summary - Writes to GitHub Actions job summary for easy access - Reduces notification noise compared to PR comments When `comment: true` (default): - Preserves existing behavior of posting/updating PR comments - Maintains backward compatibility for all existing users For Craft's own repository, the workflow automatically uses check run mode when triggered via pull_request events (dogfooding). Documentation updated to explain both modes with examples, pros/cons, and required permissions for each mode.
Contributor
|
- Add 'Semver impact: ' prefix to check run title for clarity - Remove unnecessary footer link from job summary
- Use jq to safely construct JSON payload - Add details_url to link to Actions run - Include full changelog in output.summary - Add explicit API version header
Remove duplicate 'Semver Impact' header - it's already in the title Remove extra explanatory text to clean up the display
The Check Runs API was causing grouping issues in the GitHub UI where the 'Changelog' check was being grouped under other workflows like 'CodeQL'. The Commit Status API provides a cleaner solution: - Status appears independently in the checks list (not grouped) - Simpler API with fewer parameters - Works reliably with GITHUB_TOKEN - Still shows semver impact prominently Changes: - Replace check runs creation with commit status creation - Update permissions from checks:write to statuses:write - Update all documentation references - Simplify implementation (no need for complex JSON with jq) - Full changelog still available in Actions job summary
Commit Status API doesn't support 4-byte Unicode (emojis). Keep emojis in BUMP_BADGE for display, but use plain text for the status description field.
- Change context from 'Changelog' to 'Changelog Preview / Semver Impact' - Simplify description to just the bump type (e.g., 'Minor') - Remove 'Semver impact:' prefix since it's now in the context name Result: Status shows as 'Changelog Preview / Semver Impact — Minor'
betegon
reviewed
Jan 15, 2026
Comment on lines
+164
to
+172
| BUMP_EMOJI="🔴" | ||
| ;; | ||
| minor) | ||
| BUMP_SHORT="Minor" | ||
| BUMP_EMOJI="🟡" | ||
| ;; | ||
| patch) | ||
| BUMP_SHORT="Patch" | ||
| BUMP_EMOJI="🟢" |
Member
There was a problem hiding this comment.
that color codes are WORLDWIDE known to signal:
green: go ahead, yellow: warning, and red: don't.
what about using arbitrary colors instead ☮️
Member
Author
There was a problem hiding this comment.
That was kind of the intention though?
Patch -> Always safe
Minor -> Might be safe
Major -> Danger, be careful!
betegon
approved these changes
Jan 15, 2026
BYK
commented
Jan 15, 2026
7 tasks
supervacuus
added a commit
to getsentry/sentry-java
that referenced
this pull request
Jan 22, 2026
Which aligns with the permission requirements here: getsentry/craft#722
8 tasks
supervacuus
added a commit
to getsentry/sentry-java
that referenced
this pull request
Jan 22, 2026
* chore(ci): write permission for statuses in changelog preview Which aligns with the permission requirements here: getsentry/craft#722 * Update CHANGELOG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
comment: true|falseinput to the changelog-preview workflow to reduce notification noise. When set tofalse, the workflow creates a commit status instead of posting PR comments.Changes
comment(boolean, defaults totruefor backward compatibility)comment: false):comment: true, default):Implementation Details
Uses the Commit Status API rather than Check Runs API because:
GITHUB_TOKEN(no GitHub App required)The full changelog is always available in the GitHub Actions job summary (accessible via the status link).
Documentation
Updated
docs/src/content/docs/github-actions.mdwith:commentinput documentationstatuses: writefor status check mode)Example
This PR demonstrates status check mode. Look for:
in the checks section below.