Skip to content

Test github action to merge PR #31

Test github action to merge PR

Test github action to merge PR #31

Workflow file for this run

name: Integrate
on:
issue_comment:
types: [ created ]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.issue.pull_request.url }}
jobs:
integrate:
name: Integrate
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/integrate')
runs-on: ubuntu-latest
steps:
- name: Clone Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout Pull Request
run: |
PR_NUM=${PR_URL##*/}
gh pr checkout $PR_NUM
- uses: ruby/setup-ruby@master
- name: Install gems
run: bundle install
- name: Install dependencies
run: bundle exec appraisal install
- name: Run Rubocop
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 --merge --delete-branch
- name: Success feedback
if: job.status == 'success'
run: |
gh api graphql --paginate -f query='
mutation {
addReaction(input: { clientMutationId: "integrate.yml", content: THUMBS_UP, subjectId: "${{github.event.comment.node_id}}" }) {
clientMutationId
}
}'
- name: Failure feedback
if: job.status != 'success'
run: |
gh api graphql --paginate -f query='
mutation {
addReaction(input: { clientMutationId: "integrate.yml", content: THUMBS_DOWN, subjectId: "${{github.event.comment.node_id}}" }) {
clientMutationId
}
}'