How to set GitHub action to comment on new PR excluding specific users?
03:38 05 Oct 2021

I want to integrate github-action-comment-pull-request from the official GitHub marketplace.

This is my current YAML:

on: [pull_request]

jobs:
    build:
        name: Comment a pull_request
        runs-on: ubuntu-latest
        steps:
            - name: Checkout
              uses: actions/checkout@v2

            - name: Comment a pull_request
              uses: mb2dev/github-action-comment-pull-request@1.0.0
              with:
                message: "Hello, Thank you for this PR!"
                GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

My problem is that I want the message to be shown for all new PRs except PRs raised by specific users: userA, userB. Preferably also to exclude users for a specific GitHub team.

Is this possible?

github github-actions