Adds auto instructions reply bot for merged pull requests

This commit is contained in:
Akshay Nair
2020-10-07 23:04:15 +05:30
parent 82ddad5a04
commit 133b4c2c2b
3 changed files with 72 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
name: Helper
on:
pull_request_target:
types:
- closed
jobs:
instructions:
name: instructions
runs-on: ubuntu-latest
if:
steps:
- uses: actions/checkout@v2
- name: Comment
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const { hasLabel } = require(`${process.env.GITHUB_WORKSPACE}/scripts/action-utils.js`);
const { instructions } = require(`${process.env.GITHUB_WORKSPACE}/scripts/reply.js`);
if (hasLabel(context, 'domain'))
await instructions(context, github);