forked from zwave-js/node-zwave-js
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 1.04 KB
/
auto-merge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: 'Z-Wave Bot: Auto-Merge'
on:
issue_comment:
types: [created] # edited, deleted
jobs:
# #########################################################################
# Adds the "automerge" label when an authorized person comments
# @zwave-js-bot automerge
add-automerge-label:
if: |
contains(github.event.issue.html_url, '/pull/') &&
contains(github.event.comment.body, '@zwave-js-bot automerge') &&
(github.event.comment.user.login == 'AlCalzone' || github.event.comment.user.login == 'renovate[bot]')
runs-on: [ubuntu-latest]
strategy:
matrix:
node-version: [14.x] # This should be LTS
steps:
- uses: actions/github-script@v4
with:
github-token: ${{secrets.BOT_TOKEN}}
script: |
const options = {
owner: context.repo.owner,
repo: context.repo.repo,
};
await github.issues.addLabels({
...options,
issue_number: context.payload.issue.number,
labels: ["automerge"]
});