mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
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:
22
.github/workflows/add-mog-label.yml
vendored
Normal file
22
.github/workflows/add-mog-label.yml
vendored
Normal 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 }}
|
||||
Reference in New Issue
Block a user