File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
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 \
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
You can’t perform that action at this time.
0 commit comments