From f8bf9a63a13e127f9b4cd19bd0e86ae07f35f272 Mon Sep 17 00:00:00 2001 From: Jack Ye Date: Thu, 5 Feb 2026 13:10:09 -0800 Subject: [PATCH] fix: avoid force push in codex workflows to work with v0.95.0 git safety MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Codex CLI v0.95.0 hardened git command safety so force push (`git push -f`) now requires approval, which blocks it in non-interactive exec mode. Replace force push with `gh api` branch deletion followed by regular `git push`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .github/workflows/codex-update-lance-dependency.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codex-update-lance-dependency.yml b/.github/workflows/codex-update-lance-dependency.yml index 41d3b3068..2619eb91b 100644 --- a/.github/workflows/codex-update-lance-dependency.yml +++ b/.github/workflows/codex-update-lance-dependency.yml @@ -92,7 +92,7 @@ jobs: 4. Ensure the repository is clean except for intentional changes. Inspect "git status --short" and "git diff" to confirm the dependency update and any required fixes. 5. Create and switch to a new branch named "${BRANCH_NAME}" (replace any duplicated hyphens if necessary). 6. Stage all relevant files with "git add -A". Commit using the message "${COMMIT_TYPE}: update lance dependency to v${VERSION}". - 7. Push the branch to origin. If the branch already exists, force-push your changes. + 7. Push the branch to origin. If the remote branch already exists, delete it first with "gh api -X DELETE repos/lancedb/lancedb/git/refs/heads/${BRANCH_NAME}" then push with "git push origin ${BRANCH_NAME}". Do NOT use "git push --force" or "git push -f". 8. env "GH_TOKEN" is available, use "gh" tools for github related operations like creating pull request. 9. Create a pull request targeting "main" with title "${COMMIT_TYPE}: update lance dependency to v${VERSION}". First, write the PR body to /tmp/pr-body.md using a heredoc (cat <<'EOF' > /tmp/pr-body.md). The body should summarize the dependency bump, clippy/fmt verification, and link the triggering tag (${TAG}). Then run "gh pr create --body-file /tmp/pr-body.md". 10. After creating the PR, display the PR URL, "git status --short", and a concise summary of the commands run and their results.