Skip to content

Fix CV update workflow: git rebase failing on dirty working tree#2

Merged
oddish3 merged 1 commit into
mainfrom
copilot/fix-monthly-cv-update-action
Mar 31, 2026
Merged

Fix CV update workflow: git rebase failing on dirty working tree#2
oddish3 merged 1 commit into
mainfrom
copilot/fix-monthly-cv-update-action

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

git pull --rebase was running before git add, so every run failed instantly — Git refuses to rebase over unstaged changes left by the R script and Typst compiler.

Changes

  • Reorder git operations: git add + git commit now happen before any git pull --rebase; the retry loop's rebase only runs after the tree is clean
  • Drop pre-commit pull: the git pull --rebase before staging was removed entirely — divergence is already handled by the push-retry loop
  • Fix no-change detection: git diff --quiet silently ignores untracked files; added git ls-files --others check to catch a brand-new cv/resume.pdf
# Before (broken)
git pull --rebase origin main        # ← exits 128: unstaged changes from R/Typst
git add cv/resume.pdf cv/resume.typ research/index.qmd
git commit -m "Automated CV update [skip ci]"

# After
git add cv/resume.pdf cv/resume.typ research/index.qmd
git commit -m "Automated CV update [skip ci]"
# push retry loop calls git pull --rebase here, when tree is clean ✓

@oddish3 oddish3 marked this pull request as ready for review March 31, 2026 08:06
@oddish3 oddish3 merged commit c587ed3 into main Mar 31, 2026
1 check passed
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.

2 participants