Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to use github's auto merge #302

Merged
merged 1 commit into from Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Expand Up @@ -25,6 +25,18 @@ _Optional_ The merge method you would like to use (squash, merge, rebase). Defau

_Optional_ An arbitrary message that you'd like to comment on the PR after it gets auto-merged. This is only useful when you're recieving too much of noise in email and would like to filter mails for PRs that got automatically merged.

### `use-github-auto-merge`

_Optional_ If `true`, the PR is marked as auto-merge and will be merged by GitHub when status checks are satisfied. Default to `false`.

_NOTE_ This feature only works when all of the following conditions are met.

- The repository enables auto-merge.
- The pull request base must have a branch protection rule.
- The pull request's status checks are not yet satisfied.
simoneb marked this conversation as resolved.
Show resolved Hide resolved

Refer to [the official document](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request) about GitHub auto-merge.

### `target`

_Optional_ A flag to only auto-merge updates based on Semantic Versioning. Defaults to `any`.
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Expand Up @@ -21,6 +21,10 @@ inputs:
description: "An arbitrary message that you'd like to comment on the PR after it gets auto-merged"
required: false
default: ''
use-github-auto-merge:
description: 'If true, the PR is only marked as auto-merge enabled'
required: false
default: false
target:
description: 'Auto-merge on major, minor, patch updates based on Semantic Versioning'
required: false
Expand Down