Skip to content

Commit

Permalink
chore: remove octokit action dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Mar 5, 2024
1 parent 3424977 commit 2ef43e7
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions .github/workflows/updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,27 +145,12 @@ jobs:
Write-Output "::warning::Target branch '$prBranch' has been changed manually - skipping updater to avoid overwriting these changes."
}
- name: Fetch an existing PR
if: ${{ ( steps.target.outputs.latestTag != steps.target.outputs.originalTag ) && ( steps.root.outputs.changed == 'false') }}
uses: octokit/request-action@89697eb6635e52c6e1e5559f15b5c91ba5100cb0 # v2.1.9
id: existing-pr-request
with:
route: GET /repos/${{ github.repository }}/pulls?base={base}&head={head}
head: '${{ github.repository }}:${{ steps.root.outputs.prBranch }}'
base: '${{ steps.root.outputs.baseBranch }}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Parse the existing PR URL
if: ${{ ( steps.target.outputs.latestTag != steps.target.outputs.originalTag ) && ( steps.root.outputs.changed == 'false') }}
id: existing-pr
run: |
$data = @'
${{ steps.existing-pr-request.outputs.data }}
'@
$data = gh api repos/${{ github.repository }}/pulls?base=${{ steps.root.outputs.baseBranch }}&head=${{ github.repository }}:${{ steps.root.outputs.prBranch }}
$prCount = $($data | jq '. | length')
if ($prCount -eq '0')
{
"url=" | Tee-Object $env:GITHUB_OUTPUT -Append
Expand Down

0 comments on commit 2ef43e7

Please sign in to comment.