Search pull-request comments
ActionsSearches 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.
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/[email protected]
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.
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.