-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from 0x4007/fix/rate-limits
fix/rate limits
- Loading branch information
Showing
1 changed file
with
11 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,22 +32,29 @@ inputs: | |
statics_directory: | ||
description: "Directory that contains static files" | ||
required: false | ||
app_id: | ||
description: "GitHub App ID" | ||
required: false | ||
private_key: | ||
description: "GitHub App Private Key" | ||
required: false | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Get GitHub App token | ||
if: inputs.app_id != '' && inputs.private_key != '' # Only attempt to authenticate if `app_id` and `private_key` are provided | ||
uses: tibdex/[email protected] | ||
id: get_installation_token | ||
with: | ||
app_id: ${{ secrets.APP_ID }} | ||
private_key: ${{ secrets.APP_PRIVATE_KEY }} | ||
app_id: ${{ inputs.app_id }} | ||
private_key: ${{ inputs.private_key }} | ||
|
||
- name: Find associated pull request | ||
id: pr | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{ steps.get_installation_token.outputs.token }} | ||
github-token: ${{ steps.get_installation_token.outputs.token || github.token }} | ||
script: | | ||
const response = await github.rest.search.issuesAndPullRequests({ | ||
q: 'repo:${{ inputs.repository }} is:pr sha:${{ inputs.commit_sha }}', | ||
|
@@ -92,4 +99,4 @@ runs: | |
--deployment_output "${{ env.DEPLOYMENT_OUTPUT }}" \ | ||
--repository "${{ inputs.repository }}" \ | ||
--pull_request_number "${{ fromJSON(steps.pr.outputs.result).pullRequestNumber }}" \ | ||
--commit_sha "${{ inputs.commit_sha }}" | ||
--commit_sha "${{ inputs.commit_sha }}" |