Skip to content

Commit

Permalink
Update integrate.yml
Browse files Browse the repository at this point in the history
Add command to merge PR
  • Loading branch information
danielsilva authored Dec 4, 2023
1 parent 29b7ba1 commit 3c3da38
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/integrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ on:
types: [ created ]

env:
PR_REF: ${{ format('refs/heads/{0}', github.event.pull_request.head.ref) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.issue.pull_request.url }}

jobs:
integrate:
Expand All @@ -18,10 +19,7 @@ jobs:
with:
fetch-depth: 0
- name: Checkout Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_URL="${{ github.event.issue.pull_request.url }}"
PR_NUM=${PR_URL##*/}
gh pr checkout $PR_NUM
- uses: ruby/setup-ruby@master
Expand All @@ -33,3 +31,7 @@ jobs:
run: bundle exec appraisal rake rubocop
- name: Run Specs
run: bundle exec appraisal rake spec
- name: Merge PR
run: |
PR_NUM=${PR_URL##*/}
gh pr merge $PR_NUM

0 comments on commit 3c3da38

Please sign in to comment.