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

feat: add target parameter, make it major by default #47

Merged
merged 1 commit into from Jul 2, 2021
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
16 changes: 14 additions & 2 deletions .github/workflows/ci.yml
@@ -1,7 +1,19 @@
name: CI
on: pull_request
on: [push, pull_request]
jobs:
approve:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/setup-node@v2.1.5
with:
node-version: '14.x'
- run: npm ci
- run: npm run lint
- run: npm run test

automerge:
needs: build
runs-on: ubuntu-latest
steps:
- uses: fastify/github-action-merge-dependabot@main
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,2 +1,4 @@
.vscode
node_modules/
.idea
.nyc_output
3 changes: 2 additions & 1 deletion .prettierrc
@@ -1,4 +1,5 @@
{
"singleQuote": true,
"semi": false
"semi": false,
"arrowParens": "avoid"
}
5 changes: 5 additions & 0 deletions .taprc
@@ -0,0 +1,5 @@
ts: false
jsx: false
flow: false
check-coverage: false
coverage: true
9 changes: 9 additions & 0 deletions README.md
Expand Up @@ -33,6 +33,15 @@ _Optional_ An arbitrary message that you'd like to comment on the PR after it ge

_Optional_ A custom url where the external API which is delegated the task of approving and merging responds.

### `target`

_Optional_ A flag to only auto-merge updates based on Semantic Versioning. Default to `major` merge. Possible options are:

`major, premajor, minor, preminor, patch, prepatch, or prerelease`

For more details on how semantic version difference calculated please see [semver](https://www.npmjs.com/package/semver) package


## Example usage

### Basic example
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Expand Up @@ -23,6 +23,10 @@ inputs:
description: 'Url of the API where the application is running'
required: false
default: 'https://fastify-dependabot-merge-app-5uewp47fja-uc.a.run.app/'
target:
description: 'Auto-merge on major, minor, patch updates based on Semantic Versioning'
required: false
default: 'major'
runs:
using: 'node12'
main: 'dist/index.js'
Expand Down