Skip to content

Validate commit hashes and use hash<TAB>subject format for release notes - #37

Merged
yosriady merged 1 commit into
mainfrom
codex/fix-release-note-script-for-cli-f63gcv
Aug 3, 2026
Merged

Validate commit hashes and use hash<TAB>subject format for release notes#37
yosriady merged 1 commit into
mainfrom
codex/fix-release-note-script-for-cli-f63gcv

Conversation

@yosriady

@yosriady yosriady commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Motivation

  • Ensure release-note generation cannot produce malformed or empty commit links by validating commit hashes before creating links.
  • Make the git log output unambiguous by emitting the short hash first and separating it from the subject with a real tab.

Description

  • Change git log --pretty=format to output '%h%x09%s' so each line begins with the commit hash followed by a tab and the subject.
  • Swap the read order to hash message and add a validation that the hash matches ^[0-9a-f]+$, exiting with an error if parsing fails.
  • Add comments explaining the security rationale that the loop validates the hash before making links to avoid publishing empty URLs.

Testing

  • The release workflow executes pnpm build as part of the job.
  • The release workflow executes pnpm test as part of the job and those CI steps completed successfully.

Codex Task


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@yosriady
yosriady merged commit cf6185d into main Aug 3, 2026
7 checks passed
@yosriady
yosriady deleted the codex/fix-release-note-script-for-cli-f63gcv branch August 3, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant