forked from cloudnative-pg/cloudnative-pg
-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (28 loc) · 907 Bytes
/
Copy pathchatops.yml
File metadata and controls
29 lines (28 loc) · 907 Bytes
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
# This workflow adds support for custom "slash commands" in the CI/CD pipeline.
# It is triggered by comments made on pull requests.
#
# 1. If the comment starts with "/ok-to-merge", it will label the PR with
# "ok to merge :ok_hand:"
#
name: slash-command
on:
issue_comment:
types: [created]
jobs:
ok-to-merge:
if: |
github.event.issue.pull_request &&
startsWith(github.event.comment.body, '/ok-to-merge')
runs-on: ubuntu-24.04
steps:
- name: Check User Permission
id: checkUser
uses: actions-cool/check-user-permission@v2
with:
require: 'write'
- name: Add "ok to merge :ok_hand:" label to PR
uses: actions-ecosystem/action-add-labels@v1.1.3
if: steps.checkUser.outputs.require-result == 'true'
with:
github_token: ${{ secrets.REPO_GHA_PAT }}
labels: "ok to merge :ok_hand:"