Skip to content

Commit 3857a44

Browse files
Copilotmrjf
andauthored
sync-branches: configure git credentials before merge/push step
Add git identity (user.name, user.email) and authenticated remote URL configuration before the Node.js merge script runs. Without these, merge commits fail when git identity is not set, and push/fetch operations fail when the remote URL lacks authentication. Follows the same pattern used in workflows/autoloop.md for token-based authentication via GITHUB_TOKEN env var. Agent-Logs-Url: https://github.com/githubnext/autoloop/sessions/2ca3528c-1a17-4fba-9bc7-76da39c33eb9 Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
1 parent 47042bb commit 3857a44

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

workflows/sync-branches.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@ steps:
2323
- name: Merge default branch into all autoloop program branches
2424
env:
2525
GITHUB_REPOSITORY: ${{ github.repository }}
26+
GITHUB_TOKEN: ${{ github.token }}
2627
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
2728
run: |
29+
git config user.name "github-actions[bot]"
30+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
31+
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
2832
node - << 'JSEOF'
2933
const { execSync, spawnSync } = require('child_process');
3034

0 commit comments

Comments
 (0)