Skip to content

Commit

Permalink
feat: add target parameter,make it major by default
Browse files Browse the repository at this point in the history
  • Loading branch information
fahric committed Jul 2, 2021
1 parent ac17e30 commit c2e57c2
Show file tree
Hide file tree
Showing 15 changed files with 4,644 additions and 240 deletions.
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

0 comments on commit c2e57c2

Please sign in to comment.