Skip to content

fix: prevent stale README automation branch pushes#2

Merged
zeiddata-dev merged 1 commit into
mainfrom
fix/readme-workflow-stale-push-20260521_061346
May 21, 2026
Merged

fix: prevent stale README automation branch pushes#2
zeiddata-dev merged 1 commit into
mainfrom
fix/readme-workflow-stale-push-20260521_061346

Conversation

@zeiddata-dev
Copy link
Copy Markdown
Member

Fixes stale GitHub Actions pushes for the automated profile README branch by rebuilding the automation branch from origin/main, preserving the generated README diff, fetching the remote automation ref before push, and retrying with an explicit force-with-lease.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5cb831a005

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +71 to +76
git fetch origin main --depth=1

git checkout -B "$BRANCH" origin/main


git apply --index "$PATCH_FILE"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Recompute README patch after switching to origin/main

This step computes a patch from the initial checkout (git diff ... > "$PATCH_FILE") and then resets the branch to a freshly fetched origin/main before applying it; if main advances during the run (especially with changes touching profile/README.md), git apply --index can fail and, with set -euo pipefail, the workflow aborts instead of updating the automation PR. This regression is introduced by rebasing to a newer base without regenerating the README/diff from that base.

Useful? React with 👍 / 👎.

@zeiddata-dev zeiddata-dev merged commit b91bb1c into main May 21, 2026
1 check failed
@zeiddata-dev zeiddata-dev deleted the fix/readme-workflow-stale-push-20260521_061346 branch May 21, 2026 11:26
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.

1 participant