Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 1.08 KB

File metadata and controls

38 lines (28 loc) · 1.08 KB

Search pull-request comments Action

Searches a pull-request for any comment left by a specific user. If no comment is found, the step fails. Searches through both simple and review comments.

Installation

On .github/workflows/, create a file pr_comment_search.yml:

name: <name goes here>
on: pull_request

jobs:
  search_pull_request_comments:
    runs-on: ubuntu-latest
    container: python:3.7-slim

    steps:
      - name: Search pull-request comments
        uses: peterkrauz/search-pull-request-comments@v0.0.8
        env:
          REQUIRED_COMMENT_USER: "john-doe"
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          EVENT_DETAILS: ${{ toJSON(github.event) }}

In this setup, the step will succeed if there's any comment written by john-doe in your pull-request. If john-doe did not comment in this pull-request, the job will fail.

Multiple users

You can specify multiple users by separating them with commas. The step will succeed if any of the listed users has commented:

env:
  REQUIRED_COMMENT_USER: "linear[bot],linear-code[bot]"