File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,14 +48,15 @@ jobs:
4848 echo "::endgroup::"
4949 - name : Push sync branch
5050 run : |
51+ echo "$GITHUB_TOKEN" | gh auth login --with-token
5152 git push origin sync-main-pr --force
5253 # Ensure branch is visible to GitHub
53- gh api repos/:owner/:repo/branches/sync-main-pr || {
54+ gh api repos/:owner/:repo/commits/$(git rev-parse HEAD) || {
5455 echo "Branch not yet visible to GitHub — waiting a bit more"
5556 sleep 10
5657 }
5758 git branch
58- gh api repos/:owner/:repo/branches/sync-main-pr || {
59+ gh api repos/:owner/:repo/commits/$(git rev-parse HEAD) || {
5960 echo "Branch not yet visible to GitHub — waiting a bit more"
6061 sleep 10
6162 }
@@ -65,12 +66,12 @@ jobs:
6566 - name : Create or update PR
6667 run : |
6768 git branch
68- gh api repos/:owner/:repo/branches/sync-main-pr || {
69+ gh api repos/:owner/:repo/commits/$(git rev-parse HEAD) || {
6970 echo "Branch not yet visible to GitHub — waiting a bit more"
7071 sleep 10
7172 }
7273 git branch
73- gh api repos/:owner/:repo/branches/sync-main-pr
74+ gh api repos/:owner/:repo/commits/$(git rev-parse HEAD)
7475 PR_URL=$(gh pr list --head sync-main-pr --json url --jq '.[0].url')
7576 if [ -z "$PR_URL" ]; then
7677 gh pr create \
You can’t perform that action at this time.
0 commit comments