Skip to content

Commit

Permalink
refactor branch exists to use gh cli
Browse files Browse the repository at this point in the history
  • Loading branch information
thelukewalton committed Aug 5, 2024
1 parent 59b4d39 commit 7b155b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/copy-content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ jobs:
steps:
- name: Check if existing tokens branch exists
id: check_branch
run: echo "branch_exists=$(git ls-remote --heads https://github.com/${{ inputs.repo }}.git refs/heads/${{ inputs.branch }} | wc -l | xargs)" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.PAT }}
run: echo "branch_exists=$(gh api repos/${{ inputs.repo }}/branches/${{ inputs.branch }} --jq '.name' | wc -l | xargs)" >> $GITHUB_OUTPUT
- name: Check if open PR exists
id: check_pr
env:
Expand Down
Empty file removed testFile.txt
Empty file.

0 comments on commit 7b155b7

Please sign in to comment.