Make WordPress Core

Changeset 57795


Ignore:
Timestamp:
03/09/2024 01:07:52 AM (16 months ago)
Author:
desrosj
Message:

Build/Test Tools: Do not run Props Bot for certain actions from forks.

For PRs that originate from forked repositories, pull_request_review and pull_request_review_comment events do not have the permissions necessary to comment on the PR.

This avoids needlessly running the bot when these conditions are met.

Props jorbin, wildworks.
See #60733.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/props-bot.yml

    r57544 r57795  
    5858    #
    5959    # - A comment is added to the pull request.
    60     # - A review is created or commented on.
     60    # - A review is created or commented on (unless PR originates from a fork).
    6161    # - The pull request is opened, synchronized, marked ready for review, or reopened.
    6262    # - The `props-bot` label is added to the pull request.
     
    6464      (
    6565        github.event_name == 'issue_comment' && github.event.issue.pull_request ||
    66         contains( fromJSON( '["pull_request_review", "pull_request_review_comment"]' ), github.event_name ) ||
     66        ( contains( fromJSON( '["pull_request_review", "pull_request_review_comment"]' ), github.event_name ) && ! github.event.pull_request.head.repo.fork ) ||
    6767        github.event_name == 'pull_request_target' && github.event.action != 'labeled' ||
    6868        'props-bot' == github.event.label.name
Note: See TracChangeset for help on using the changeset viewer.