Skip to content

Commit 3f5ef07

Browse files
authored
feat: add target parameter, make it major by default (#47)
1 parent ac17e30 commit 3f5ef07

File tree

15 files changed

+4644
-240
lines changed

15 files changed

+4644
-240
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
name: CI
2-
on: pull_request
2+
on: [push, pull_request]
33
jobs:
4-
approve:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2.3.4
8+
- uses: actions/setup-node@v2.1.5
9+
with:
10+
node-version: '14.x'
11+
- run: npm ci
12+
- run: npm run lint
13+
- run: npm run test
14+
15+
automerge:
16+
needs: build
517
runs-on: ubuntu-latest
618
steps:
719
- uses: fastify/github-action-merge-dependabot@main

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
.vscode
22
node_modules/
3+
.idea
4+
.nyc_output

.prettierrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"singleQuote": true,
3-
"semi": false
3+
"semi": false,
4+
"arrowParens": "avoid"
45
}

.taprc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ts: false
2+
jsx: false
3+
flow: false
4+
check-coverage: false
5+
coverage: true

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ _Optional_ An arbitrary message that you'd like to comment on the PR after it ge
3333

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

36+
### `target`
37+
38+
_Optional_ A flag to only auto-merge updates based on Semantic Versioning. Default to `major` merge. Possible options are:
39+
40+
`major, premajor, minor, preminor, patch, prepatch, or prerelease`
41+
42+
For more details on how semantic version difference calculated please see [semver](https://www.npmjs.com/package/semver) package
43+
44+
3645
## Example usage
3746

3847
### Basic example

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ inputs:
2323
description: 'Url of the API where the application is running'
2424
required: false
2525
default: 'https://fastify-dependabot-merge-app-5uewp47fja-uc.a.run.app/'
26+
target:
27+
description: 'Auto-merge on major, minor, patch updates based on Semantic Versioning'
28+
required: false
29+
default: 'major'
2630
runs:
2731
using: 'node12'
2832
main: 'dist/index.js'

0 commit comments

Comments
 (0)