Skip to content

Commit

Permalink
feat:add target option(#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
fahric committed Jul 2, 2021
1 parent ac17e30 commit cc88c79
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
name: CI
on: pull_request
on: [push, pull_request]
jobs:
approve:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
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
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.vscode
node_modules/
.idea
.nyc_output
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"singleQuote": true,
"semi": false
"semi": false,
"arrowParens": "avoid"
}
5 changes: 5 additions & 0 deletions .taprc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ts: false
jsx: false
flow: false
check-coverage: false
coverage: true
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading

0 comments on commit cc88c79

Please sign in to comment.