Skip to content

Commit

Permalink
Use the branch of the pull request when /bindings (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
yutannihilation authored Feb 25, 2023
1 parent ee9ed0a commit 99166f1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ jobs:
steps:

- uses: actions/checkout@v3

# When invoked by an issue comment event, the GitHub Actions runner runs
# on the default branch, so we need to switch the branch of the pull
# request. Since the branch name is not easily accessible via variables
# provided GitHub Actions, we use r-lib/actions, which is well-maintained.
- name: Switch branch (/bindings command)
if: github.event_name == 'issue_comment'
uses: r-lib/actions/pr-fetch@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up R
uses: r-lib/actions/setup-r@v2
Expand Down

0 comments on commit 99166f1

Please sign in to comment.