-
-
Notifications
You must be signed in to change notification settings - Fork 8
fix: version sync for fork PRs #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Change version-sync trigger from pull_request to push on main - Use PAT (MATRIX_BOT_TOKEN) for write access - Add workflow_run trigger to release-plugin - Release now triggers after version-sync completes
Greptile SummaryThis PR fixes version sync for fork PRs by moving version file updates from PR-triggered jobs to a post-merge, PAT-based workflow. The Key Changes:
Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant PR as Fork PR
participant Main as Main Branch
participant VersionSync as Version Sync Workflow
participant ReleasePlugin as Release Plugin Workflow
participant Build as Build Job
participant Package as Package Job
participant Release as GitHub Release
PR->>Main: Merge PR with CHANGELOG.md update
Main->>VersionSync: Trigger (push to main, CHANGELOG.md changed)
VersionSync->>VersionSync: Extract version from CHANGELOG
VersionSync->>VersionSync: Check if versions match
VersionSync->>Main: Commit version updates with PAT
Main->>ReleasePlugin: Trigger via workflow_run (success)
ReleasePlugin->>ReleasePlugin: Get version from package.json
ReleasePlugin->>ReleasePlugin: Check if release exists
ReleasePlugin->>Main: Create git tag if needed
Main->>Build: Build binaries (darwin-arm64, darwin-x64, linux-x64, linux-arm64)
Build->>Build: Compile with bun
Build->>Package: Upload artifacts
Package->>Package: Download all binaries
Package->>Package: Create archive (tar.gz, zip)
Package->>Release: Create GitHub Release with assets
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 files reviewed, 4 comments
|
@greptileai reassess |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 files reviewed, 1 comment
Summary
MATRIX_BOT_TOKEN) for write access to push version commitsworkflow_runafter version-sync completesProblem
Fork PRs run with read-only permissions, so version files weren't getting updated.
Solution
PAT-based bot commit after merge:
Setup Required
MATRIX_BOT_TOKENsecret (PAT with contents:write)