Skip to content

Search pull-request comments

Actions

About

Verifies if a given user has left a comment on the pull-request
v0.0.11b
Latest
Star (3)

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]"

Search pull-request comments is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Verifies if a given user has left a comment on the pull-request
v0.0.11b
Latest

Search pull-request comments is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.