Skip to content

Fix credential ordering in sync-branches workflow#26

Merged
mrjf merged 3 commits intomainfrom
copilot/fix-merge-credentials-issue
Apr 4, 2026
Merged

Fix credential ordering in sync-branches workflow#26
mrjf merged 3 commits intomainfrom
copilot/fix-merge-credentials-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 4, 2026

The compiled sync-branches workflow runs the merge/push step before Git identity and authenticated remote are configured, causing merge commits to fail (missing user.name/user.email) and pushes to fail (unauthenticated remote).

Changes

  • workflows/sync-branches.md — Added a "Set up Git identity and authentication" pre-step before the merge step. The gh-aw compiler places its framework "Configure Git credentials" step after all user pre-steps, so the source alone can't fix ordering in the compiled output.
  • .github/workflows/sync-branches.lock.yml — Reordered the framework's "Configure Git credentials" step to run before the merge step. Manual edit required because the compiler always emits framework steps after user steps. Also preserved contents: write permission (compiler was downgrading to read-all).
  • tests/test_scheduling.py — Added TestSyncBranchesCredentialOrdering with 3 tests guarding step ordering in both source .md and compiled .lock.yml.

Compiler note

The gh-aw compiler converts JSEOF heredocs to Python, drops bash preamble outside the heredoc, and inserts framework steps in a fixed position after user pre-steps. This means credential setup added to the source .md is not sufficient on its own — the lock file requires a manual ordering fix until the compiler supports step-ordering hints.

Copilot AI assigned Copilot and mrjf Apr 4, 2026
Copilot AI linked an issue Apr 4, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits April 4, 2026 05:08
…kflow

Move the "Configure Git credentials" step (user.name/user.email +
authenticated origin URL) before the merge step in the compiled
workflow so that merge commits have a valid identity and pushes
use an authenticated remote.

Also add a credential setup pre-step in the source .md file and
tests to guard against future ordering regressions.

Agent-Logs-Url: https://github.com/githubnext/autoloop/sessions/10022818-e9ec-4796-841a-d439e309e4b3

Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix git credentials setup before merge/push step Fix credential ordering in sync-branches workflow Apr 4, 2026
Copilot AI requested a review from mrjf April 4, 2026 05:11
Copilot finished work on behalf of mrjf April 4, 2026 05:11
@mrjf mrjf marked this pull request as ready for review April 4, 2026 14:21
@mrjf mrjf merged commit e930385 into main Apr 4, 2026
13 of 15 checks 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.

Merging before git creds established

2 participants