Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 1.0.0 - 2020-XX-XX
- [BREAKING] Replaced `check_run` by `check_suite`.

## 0.0.4 - 2019-11-13
- `auto-merge` input now also accepts comma separated events:
- `pull_request_review`;
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ on:
push:
# To merge pull requests if not possible during the push run. Remove if `auto-merge` is `false`.
pull_request_review:
check_run:
check_suite:
types: [completed]

jobs:
build:
name: Gitflow
runs-on: ubuntu-16.04
steps:
- uses: Logerfo/gitflow-action@0.0.4
- uses: Logerfo/gitflow-action@1.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # The `GITHUB_TOKEN` secret.
```
Expand All @@ -40,7 +40,7 @@ jobs:
name: Gitflow
runs-on: ubuntu-16.04
steps:
- uses: Logerfo/gitflow-action@0.0.4
- uses: Logerfo/gitflow-action@1.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # The `GITHUB_TOKEN` secret.
auto-merge: false # If `true`, will try to automatically merge the pull requests.
Expand All @@ -55,22 +55,22 @@ on:
push:
# To merge pull requests if not possible during the push run. Remove if `auto-merge` is `false`.
pull_request_review:
check_run:
check_suite:
types: [completed]

jobs:
build:
name: Gitflow
runs-on: ubuntu-16.04
steps:
- uses: Logerfo/gitflow-action@0.0.4
- uses: Logerfo/gitflow-action@1.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # The `GITHUB_TOKEN` secret.
release: release # The `release` branch.
dev: dev # The `dev` branch.
master: master # The `master` branch.
label: gitflow # The pull request label.
auto-merge: true # If `true`, will try to automatically merge pull requests. Can also be set to `pull_request_review`, `check_run`, `push`, or a comma-separated combination of these values to only merge when handling the named events.
auto-merge: true # If `true`, will try to automatically merge pull requests. Can also be set to `pull_request_review`, `check_suite`, `push`, or a comma-separated combination of these values to only merge when handling the named events.
require-merge: false # If an attempted merge fails, the action is considered to have failed.
```

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ inputs:
description: The pull request label.
default: gitflow
auto-merge:
description: If `true`, will try to automatically merge pull requests. Can also be set to `pull_request_review`, `check_run`, `push`, or a comma-separated combination of these values to only merge when handling the named events.
description: If `true`, will try to automatically merge pull requests. Can also be set to `pull_request_review`, `check_suite`, `push`, or a comma-separated combination of these values to only merge when handling the named events.
default: true
require-merge:
description: If an attempted merge fails, the action is considered to have failed.
Expand Down
8 changes: 4 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ async function run() {
}
break;

case "check_run":
if (isAutoMergeEvent("check_run")) {
var prs = context.payload.check_run.pull_requests;
case "check_suite":
if (isAutoMergeEvent("check_suite")) {
var prs = context.payload.check_suite.pull_requests;
if (!prs) {
core.info("Empty pull request list. Stepping out...");
return;
Expand All @@ -86,7 +86,7 @@ async function run() {
}
}
else {
core.info("Auto merge is disabled for check runs. You should remove the `check_run` event from the action configuration. Skipping...");
core.info("Auto merge is disabled for check runs. You should remove the `check_suite` event from the action configuration. Skipping...");
}
break;
}
Expand Down