@@ -77,17 +77,17 @@ jobs:
7777 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7878 run : |
7979 # Ensure labels exist to prevent errors during PR creation
80- gh label create upstream-sync --description "Syncs changes from upstream" --color 1d76db || true
81- gh label create conflict --description "Merge conflicts detected" --color b60205 || true
80+ gh label create upstream-sync --repo ${{ github.repository }} -- description "Syncs changes from upstream" --color 1d76db || true
81+ gh label create conflict --repo ${{ github.repository }} -- description "Merge conflicts detected" --color b60205 || true
8282
8383 # Debug: List labels to verify visibility
84- gh label list
84+ gh label list --repo ${{ github.repository }}
8585
8686 - name : Create Pull Request
8787 if : steps.merge.outputs.merge_status == 'success' || steps.merge.outputs.merge_status == 'conflict'
8888 run : |
8989 # Check if PR already exists
90- existing_pr=$(gh pr list --head "$SYNC_BRANCH" --base "$TARGET_BRANCH" --json number -q '.[0].number')
90+ existing_pr=$(gh pr list --repo ${{ github.repository }} -- head "$SYNC_BRANCH" --base "$TARGET_BRANCH" --json number -q '.[0].number')
9191
9292 if [[ -z "$existing_pr" ]]; then
9393 echo "Creating new PR..."
@@ -102,6 +102,7 @@ jobs:
102102 fi
103103
104104 PR_URL=$(gh pr create \
105+ --repo ${{ github.repository }} \
105106 --title "$TITLE" \
106107 --body "$BODY" \
107108 --head "$SYNC_BRANCH" \
@@ -115,9 +116,9 @@ jobs:
115116
116117 # Update comments/labels if status changed
117118 if [[ "${{ steps.merge.outputs.merge_status }}" == "conflict" ]]; then
118- gh pr edit "$existing_pr" --title "⚠️ Upstream Sync (Conflicts Detected)" --add-label "conflict" --body "Updates from upstream. Conflicts detected."
119+ gh pr edit "$existing_pr" --repo ${{ github.repository }} -- title "⚠️ Upstream Sync (Conflicts Detected)" --add-label "conflict" --body "Updates from upstream. Conflicts detected."
119120 else
120- gh pr edit "$existing_pr" --title "🔄 Upstream Sync (Clean)" --remove-label "conflict" --body "Updates from upstream. Clean merge."
121+ gh pr edit "$existing_pr" --repo ${{ github.repository }} -- title "🔄 Upstream Sync (Clean)" --remove-label "conflict" --body "Updates from upstream. Clean merge."
121122 fi
122123 fi
123124
0 commit comments