Skip to content

Commit

Permalink
feat: token param (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts authored Dec 6, 2023
1 parent f6320e5 commit ec54f4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
merge_group:
pull_request:
push:
# branches: [main]
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -17,14 +17,11 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Event details
run: |
echo "github.event_name: ${{ github.event_name }}"
echo "github.event.action: ${{ github.event.action }}"
- name: Dump GitHub Context.Event
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo "github.event_name: ${{ github.event_name }}"
echo "github.event.action: ${{ github.event.action }}"
echo "${GITHUB_CONTEXT}" | jq .
# Test for PR, merge queue and merge to main
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ runs:
# HEAD=$(git log main --oneline | head -n1 | awk '{print $1}')
HEAD=${{ github.event.after }}
pr=$(\
curl -sL -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ github.token }}" \
curl -sL -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ inputs.token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/commits/${HEAD}/pulls \
| jq .[0].number
Expand Down

0 comments on commit ec54f4e

Please sign in to comment.