Skip to content

Add git trailer to preserve workflow triggering actor#21

Merged
ChrisJBurns merged 1 commit intomainfrom
feat/add-release-triggered-by-trailer
Feb 3, 2026
Merged

Add git trailer to preserve workflow triggering actor#21
ChrisJBurns merged 1 commit intomainfrom
feat/add-release-triggered-by-trailer

Conversation

@danbarr
Copy link
Contributor

@danbarr danbarr commented Feb 3, 2026

Summary

  • Add Release-Triggered-By git trailer to commit messages by reading GITHUB_ACTOR environment variable
  • Enables downstream workflows to identify the original release initiator when using PATs for multi-stage releases

Changes

  • Added TriggeredBy field to PRRequest struct
  • Modified commitFile() to append git trailer when triggeredBy is non-empty
  • Read GITHUB_ACTOR env var in parseFlags() and pass it through to PR creation
  • Added tests for commit message format and PRRequest validation

Example

Commit message format when GITHUB_ACTOR is set:

Update VERSION for release

Release-Triggered-By: someuser

The trailer can be extracted downstream with:

git log -1 --format='%(trailers:key=Release-Triggered-By,valueonly)'

Test plan

  • All existing tests pass
  • New tests added for commit message format
  • New tests added for TriggeredBy field validation
  • Linter passes with no issues

Closes #20

Read the GITHUB_ACTOR environment variable and add a Release-Triggered-By
git trailer to commit messages. This allows downstream workflows to identify
the original release initiator when using PATs for multi-stage releases.

The trailer can be extracted with:
  git log -1 --format='%(trailers:key=Release-Triggered-By,valueonly)'

Closes #20

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ChrisJBurns ChrisJBurns merged commit b702275 into main Feb 3, 2026
3 checks passed
@danbarr danbarr deleted the feat/add-release-triggered-by-trailer branch February 3, 2026 15:42
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.

Add git trailer to preserve workflow triggering actor

2 participants