Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Doeunnkimm committed Jun 20, 2024
1 parent 096a52d commit 22935d6
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
auto-merge:
runs-on: ubuntu-latest
if: github.event.action == 'submitted' || github.event.action == 'labeled' || github.event.action == 'unlabeled'

steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand Down Expand Up @@ -47,7 +47,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Merge Pull Request on Review
if: github.event.action == 'submitted' && github.event.review.state == 'approved' && env.NO_AUTO_MERGE == 'false'
if: |
github.event_name == 'pull_request_review' &&
github.event.review.state == 'approved' &&
env.NO_AUTO_MERGE == 'false'
uses: actions/github-script@v6
with:
script: |
Expand All @@ -66,7 +69,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Merge Pull Request on Label
if: github.event.action == 'labeled' && env.NO_AUTO_MERGE == 'false'
if: |
github.event_name == 'pull_request' &&
github.event.action == 'labeled' &&
env.NO_AUTO_MERGE == 'false'
uses: actions/github-script@v6
with:
script: |
Expand Down Expand Up @@ -95,7 +101,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Merge Pull Request on Unlabel
if: github.event.action == 'unlabeled' && github.event.label.name == 'no auto merge'
if: |
github.event_name == 'pull_request' &&
github.event.action == 'unlabeled' &&
github.event.label.name == 'no auto merge'
uses: actions/github-script@v6
with:
script: |
Expand Down

0 comments on commit 22935d6

Please sign in to comment.