11 lines
1.1 KiB
Markdown
11 lines
1.1 KiB
Markdown
# 2026-02-23 Session Notes
|
|
|
|
## Post-Push Auto-Pull Hook Implementation
|
|
|
|
The session began with a plan to eliminate manual `git pull` after pushing to main. The GitHub Actions `release.yml` workflow automatically bumps versions, generates changelogs, and pushes back, leaving the local repo 1 commit behind. The plan calls for creating a post-push synchronization system.
|
|
|
|
The implementation approach chosen was a shell script (`scripts/post-push-sync.sh`) combined with a git alias for simplicity and reliability. The script polls the GitHub Actions release workflow, waits for completion (with a 3-minute timeout), and automatically pulls the release commit back down. The git alias `pushsync` wraps both the push and sync operations into a single command.
|
|
|
|
Key design decisions: only act on main branch pushes, use GitHub CLI (`gh`) for workflow polling, poll every 10 seconds with a 180-second timeout, and use `git pull --ff-only` to ensure safe merging. The script gracefully handles cases where the workflow is skipped or fails.
|
|
|
|
No implementation work was completed in this session—only the plan was reviewed and prepared for execution. |