Check whether the GitHub comment was triggered by a user with write permissions
| Name | Description | Required | Default |
|---|
- Adds a
+1reaction to the triggering issue comment. - Checks the comment author's repository permission level.
- Allows execution only for users with
writeoradminpermission. - Posts an explanatory comment and fails the action when the user is not permitted.
---
name: Is GitHub comment allowed
on:
issue_comment:
types: [created]
jobs:
run-action-if-comment:
if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/run-test')
runs-on: ubuntu-latest
steps:
- uses: elastic/oblt-actions/github/validate-comment@v1
# ...