Adds the mog action

The mog action will add a `merge-on-green` label to a PR if a user adds a comment that contains the word "MOG" in it.
This commit is contained in:
Andrew Eisenberg
2020-07-27 14:16:05 -07:00
committed by GitHub
parent c5a4a6be05
commit cce8bed59e

22
.github/workflows/add-mog-label.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
name: "Add Merge on Green Label"
on:
issue_comment:
types: [created, edited]
jobs:
addMogLabel:
runs-on: ubuntu-latest
if:
${{ github.event.issue.pull_request && contains(github.event.comment.body, 'mog') }}
steps:
- name: Add label using Request Action
uses: octokit/request-action@v2.x
with:
route: POST /repos/:repository/issues/:issue_number/labels
repository: ${{ github.repository }}
issue_number: ${{ github.event.issue.number }}
labels: |
- "merge-on-green"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}