Skip to content

Add PR comments and job summary features#12

Closed
TheKathan wants to merge 20 commits into
mainfrom
test/pr-features
Closed

Add PR comments and job summary features#12
TheKathan wants to merge 20 commits into
mainfrom
test/pr-features

Conversation

@TheKathan
Copy link
Copy Markdown
Owner

Summary

  • Add PR comment feature with version table (Type, Branch, Bump)
  • Add job summary feature with same table format
  • Comments update in place (no duplicates)
  • Only show on PRs when pre-release is enabled
  • Add new outputs: branch, previous-version, bump-type
  • Improved tag handling to prevent duplicate tag errors

Features

  • PR Comments: Shows version info in a clean table format on PRs
  • Job Summaries: Shows same info in workflow summary
  • Comment Reuse: Updates existing comments instead of creating new ones
  • Conditional Display: Only shows when appropriate (pre-release enabled or on main)

Testing

  • Tested PR comment display and updates
  • Tested job summary display
  • Tested tag creation and duplicate handling
  • Updated README with new features

TheKathan and others added 20 commits February 12, 2026 23:56
- Enable comment-on-pr in workflow
- Enable add-to-summary in workflow
- Add pull-requests write permission
- Minor README update to trigger workflow
- Remove 'Will be published as pre-release tag' line
- Remove 'Will be published when merged to main' line
- Keep only version and type information
- Update existing bot comment instead of creating new ones
- Change wording from 'will create' to 'has been tagged as'
- Check for existing comment by searching for '📦 Version' marker
- Use heredoc to create comment body file
- Use placeholders and sed to substitute values
- Avoids YAML parsing issues with multiline strings
Remove placeholder approach and sed substitution in favor of direct variable expansion in heredoc. This simplifies the code and avoids YAML parsing issues.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Change from 'Type: **X**' to inline format '**VERSION** (TYPE)' to avoid YAML parser confusion with colons.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Use printf instead of heredoc for creating comment body to completely avoid YAML parser confusion with heredoc markers.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Change author.login from 'github-actions' to 'github-actions[bot]' to properly match GitHub Actions bot comments.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add branch name, bump type, and previous version to PR comment for better visibility. Also add these as action outputs.
Extract job summary logic into separate step for better organization and consistency with PR comment step. Use same table format for both.
- Document new outputs (branch, previous-version, bump-type)
- Add section showing PR comment and job summary features
- Clarify comment-on-pr requires enable-prerelease
- Show table format example
Prevents 'tag already exists' error when workflow runs multiple times on same commit.
@github-actions
Copy link
Copy Markdown

📦 Version: v1.0.8-test.1

Field Value
Type Pre-release
Branch test/pr-features
Bump Patch

@TheKathan TheKathan closed this Feb 12, 2026
@TheKathan TheKathan deleted the test/pr-features branch February 12, 2026 23:29
@TheKathan TheKathan restored the test/pr-features branch February 12, 2026 23:29
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