Skip to content

Commit 642ee1b

Browse files
committed
Update check-example-sync-conflict.yml
1 parent b122562 commit 642ee1b

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/check-example-sync-conflict.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
- name: Check for conflicting sync PR on cosmos/example
2121
env:
2222
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
EXAMPLE_TOKEN: ${{ secrets.EXAMPLE_REPO_TOKEN }}
2324
PR_NUMBER: ${{ github.event.pull_request.number }}
2425
run: |
2526
# Get files changed in this PR that are in the tutorials folder
@@ -30,8 +31,8 @@ jobs:
3031
3132
echo "Files changed in this PR: $THIS_PR_FILES"
3233
33-
# Get all open docs-sync PRs on cosmos/example
34-
SYNC_PRS=$(gh pr list \
34+
# Get all open docs-sync PRs on cosmos/example (use cross-repo PAT)
35+
SYNC_PRS=$(GH_TOKEN="$EXAMPLE_TOKEN" gh pr list \
3536
--repo cosmos/example \
3637
--label "docs-sync" \
3738
--state open \
@@ -53,7 +54,7 @@ jobs:
5354
SYNC_PR_URL=$(echo "$pr" | jq -r '.url')
5455
SYNC_PR_URLS="$SYNC_PR_URLS $SYNC_PR_URL"
5556
56-
SYNC_FILES=$(gh pr view "$SYNC_PR_NUMBER" \
57+
SYNC_FILES=$(GH_TOKEN="$EXAMPLE_TOKEN" gh pr view "$SYNC_PR_NUMBER" \
5758
--repo cosmos/example \
5859
--json files \
5960
--jq '[.files[].path

0 commit comments

Comments
 (0)