Skip to content

Latest commit

 

History

History
40 lines (33 loc) · 1.3 KB

File metadata and controls

40 lines (33 loc) · 1.3 KB

github/validate-comment

usages

Check whether the GitHub comment was triggered by a user with write permissions

Inputs

Name Description Required Default

Behavior

  • Adds a +1 reaction to the triggering issue comment.
  • Checks the comment author's repository permission level.
  • Allows execution only for users with write or admin permission.
  • Posts an explanatory comment and fails the action when the user is not permitted.

Usage

---
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
      # ...