Skip to content

[11주차 2 미완] Spring Boot Actuator (1) #8

[11주차 2 미완] Spring Boot Actuator (1)

[11주차 2 미완] Spring Boot Actuator (1) #8

name: Auto Merge PRs
on:
pull_request:
types: [opened, synchronize]
branches:
- main
jobs:
auto-merge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Auto approve and merge if from bot/count-files branch
if: github.event.pull_request.head.ref == 'bot/count-files'
run: |
echo "Approving and merging PR from bot/count-files branch"
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews \
-d '{"event":"APPROVE"}'
curl -X PUT -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/merge \
-d '{"commit_title":"${{ github.event.pull_request.title }}","merge_method":"merge"}'