Skip to content

Add PR comments and job summary features#13

Merged
TheKathan merged 20 commits into
mainfrom
feature/pr-comments-and-summary
Feb 12, 2026
Merged

Add PR comments and job summary features#13
TheKathan merged 20 commits into
mainfrom
feature/pr-comments-and-summary

Conversation

@TheKathan
Copy link
Copy Markdown
Owner

Summary

Add comprehensive PR comment and job summary features with version information display.

Changes

  • PR Comments: Displays version, type, branch, and bump info in table format
  • Job Summaries: Shows same info in GitHub Actions workflow summary
  • Smart Updates: Comments update in place instead of creating duplicates
  • Conditional Display: Only shows when pre-release enabled or on main branch
  • New Outputs: Added branch, previous-version, bump-type outputs
  • Tag Handling: Prevents duplicate tag errors with existence check
  • Documentation: Updated README with new features and examples

Table Format

Both PR comments and job summaries display:

## 📦 Version: v1.2.0-alpha.1

| Field | Value |
|-------|-------|
| Type | Pre-release |
| Branch | feature/new-feature |
| Bump | Minor |

Testing

  • ✅ PR comment display and updates working
  • ✅ Job summary display working
  • ✅ Tag creation and duplicate handling working
  • ✅ Documentation updated and accurate

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.1.0-alpha.1

Field Value
Type Pre-release
Branch feature/pr-comments-and-summary
Bump Minor

@TheKathan TheKathan merged commit 5220a62 into main Feb 12, 2026
2 checks passed
@TheKathan TheKathan deleted the feature/pr-comments-and-summary branch February 12, 2026 23:31
github-actions Bot pushed a commit that referenced this pull request Feb 13, 2026
* Test PR comment and summary features

- Enable comment-on-pr in workflow
- Enable add-to-summary in workflow
- Add pull-requests write permission
- Minor README update to trigger workflow

* Simplify PR comment - remove unnecessary note

- Remove 'Will be published as pre-release tag' line
- Remove 'Will be published when merged to main' line
- Keep only version and type information

* Reuse PR comment and fix wording

- 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

* Fix YAML syntax by using heredoc with placeholders

- Use heredoc to create comment body file
- Use placeholders and sed to substitute values
- Avoids YAML parsing issues with multiline strings

* fix: simplify PR comment generation using direct variable expansion

Remove placeholder approach and sed substitution in favor of direct variable expansion in heredoc. This simplifies the code and avoids YAML parsing issues.


* fix: simplify comment format to avoid YAML parsing issues

Change from 'Type: **X**' to inline format '**VERSION** (TYPE)' to avoid YAML parser confusion with colons.


* fix: replace heredoc with printf to avoid YAML parsing

Use printf instead of heredoc for creating comment body to completely avoid YAML parser confusion with heredoc markers.


* fix: correct GitHub Actions bot username

Change author.login from 'github-actions' to 'github-actions[bot]' to properly match GitHub Actions bot comments.


* Update PR comment to cleaner one-line format

* Move type to separate line in PR comment

* Add comprehensive info to PR comment

Add branch name, bump type, and previous version to PR comment for better visibility. Also add these as action outputs.

* Format PR comment as table

* Only show PR comment when pre-release is enabled

* Only show job summary when on main or pre-release enabled

* Separate job summary into its own step

Extract job summary logic into separate step for better organization and consistency with PR comment step. Use same table format for both.

* Remove Previous field from PR comment and summary

* Update README with PR comment and job summary documentation

- 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

* Add check to skip if tag already exists

Prevents 'tag already exists' error when workflow runs multiple times on same commit.

* Remove redundant comments

* Remove testing note from README

---------
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