Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions .github/workflows/create-github-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,12 @@ jobs:

- name: Get github app access token
id: get_access_token
env:
GITHUB_APP_ID: ${{ secrets.XERO_GITHUB_APP_ID }}
GITHUB_APP_PRIVATE_KEY: ${{ secrets.XERO_GITHUB_APPLICATION_KEY }}
uses: actions/github-script@v7
uses: actions/create-github-app-token@v2
with:
result-encoding: string
script: |
const { getAccessToken } = await import('${{ github.workspace }}/.github/get-access-token/index.js')
const token = await getAccessToken()
return token
app-id: ${{ secrets.XERO_PUBLIC_BOT_APP_ID}}
private-key: ${{ secrets.XERO_PUBLIC_BOT_KEY }}
owner: xero-internal
repositories: xeroapi-sdk-codegen

- name: Fetch Latest release number
id: get_latest_release_number
Expand All @@ -41,7 +37,7 @@ jobs:
echo "Latest release version is - $latest_version"
echo "releaseVersion=$latest_version" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{steps.get_access_token.outputs.result}}
GH_TOKEN: ${{steps.get_access_token.outputs.token}}

- name: Set up branch name
id: identify_branch_name
Expand Down Expand Up @@ -121,4 +117,4 @@ jobs:
echo "PR is already up to date"
fi
env:
GH_TOKEN: ${{steps.get_access_token.outputs.result}}
GH_TOKEN: ${{steps.get_access_token.outputs.token}}
2 changes: 1 addition & 1 deletion .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
id: get_access_token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.XERO_GITHUB_APP_ID }}
app-id: ${{ vars.XERO_CODEGEN_APP_ID }}
private-key: ${{ secrets.XERO_GITHUB_APPLICATION_KEY }}
owner: xero-internal
repositories: xeroapi-sdk-codegen
Expand Down
Loading