Skip to content

Commit

Permalink
feat: allow different bot name to auto-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
viestat authored Jan 28, 2020
1 parent 290f4a6 commit 1a8a7e3
Show file tree
Hide file tree
Showing 12 changed files with 763 additions and 699 deletions.
1 change: 1 addition & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ overrides:
rules:
'@typescript-eslint/camelcase': 'off'
'@typescript-eslint/no-magic-numbers': 'off'
'max-lines': 'off'
max-lines-per-function: 'off'
no-magic-numbers: 'off'
parserOptions:
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,22 @@ auto-merge:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
### Enable auto-merge for a different bot
You may have another bot that also creates PRs against your repository and you
want to automatically merge those. By default, this GitHub Action assumes the
bot is [`dependabot`](https://dependabot.com/). You can override the bot name by
changing the value of `GITHUB_LOGIN` parameter:

```yaml
steps:
- name: Auto merge
uses: ridedott/dependabot-auto-merge-action@master
with:
GITHUB_LOGIN: my-awesome-bot-r2d2
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

## Getting Started

These instructions will get you a copy of the project up and running on your
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ inputs:
GITHUB_TOKEN:
description: 'A GitHub token.'
required: true
GITHUB_LOGIN:
description: 'The GitHub login for which automatic merges are enabled.'
required: false
default: 'dependabot-preview[bot]'
runs:
using: 'node12'
main: 'dist/index.js'
Loading

0 comments on commit 1a8a7e3

Please sign in to comment.