Skip to content

Add tag metadata display and annotation support - #3

Merged
linyows merged 13 commits into
mainfrom
add-annotation
Oct 4, 2025
Merged

linyows merged 13 commits into
mainfrom
add-annotation

Conversation

@linyows

@linyows linyows commented Oct 4, 2025

Copy link
Copy Markdown
Owner

Summary

  • Add annotation tag creation with author information from git config
  • Add tag metadata display in list command (authordate, subject, authorname)
  • Implement TagInfo struct with Format method for clean output formatting

Changes

Tag Creation

  • Add DoWithEnv method to Cmder interface
  • Add prepareAuthorEnv to set git author from config
  • Update tag creation to use author environment variables

List Command Enhancement

  • Add TagInfo struct to store tag metadata (authordate, subject, authorname)
  • Update list command to display tags with metadata in tab-separated format
  • Implement Format method for TagInfo to encapsulate output formatting
  • Handle empty metadata fields by displaying "-"

Testing

  • Add TestGetListWithTagInfo to test tag list with metadata
  • Add TestTagInfoFormat to test Format method with normal and empty values
  • Add TestGitTagAnnotation and TestCmdDoWithEnv for annotation functionality

Test plan

  • All existing tests pass
  • New unit tests for TagInfo formatting
  • New unit tests for annotation tag creation
  • Manual test: go run cmd/git-semv/main.go list displays metadata

🤖 Generated with Claude Code

linyows and others added 8 commits October 4, 2025 18:16
Add TagInfo struct to store tag metadata (authordate, subject, authorname).
Update list command to display tags with metadata in tab-separated format.
Implement Format method for TagInfo to encapsulate output formatting.
Handle empty metadata fields by displaying "-".

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add TestGetListWithTagInfo to test tag list with metadata.
Add TestTagInfoFormat to test Format method with normal and empty values.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add DoWithEnv method to Cmder interface.
Add prepareAuthorEnv to set git author from config.
Update tag creation to use author environment variables.
Add tests for DoWithEnv method.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove subject field (not useful in most cases)
- Change from author to tagger info for consistency
- Display tagger date and name for annotated tags
- Show empty strings for lightweight tags instead of "-"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add go 1.23 to go.mod to specify supported Go version
- Update lint workflow to use Go 1.23.x instead of stable
- Update release workflow to use Go 1.23.x and --clean flag
- Fix goreleaser deprecated --rm-dist flag (use --clean instead)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
linyows and others added 5 commits October 4, 2025 23:04
- Update golangci-lint version from 'latest' to v2.5.0
- v2.4.0+ supports Go 1.25

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- golangci-lint v2 requires golangci-lint-action v7

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add explicit error handling for fmt.Fprintf calls
- Ignore errors where appropriate using blank identifier

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add error handling for all remaining fmt.Fprintf calls

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@linyows
linyows merged commit cc6b3d3 into main Oct 4, 2025
@linyows
linyows deleted the add-annotation branch October 4, 2025 14:16
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

⌂ 换网址