Comment
Post a comment on a pull request.
The comment action allows Mergify to post a comment on your pull request when
certain conditions are met.
The comment action can provide automated responses to events in your pull request workflow, based on the conditions and message you customize.
Parameters
Section titled Parametersmessage#The message to write as a comment.
Examples
Section titled ExamplesNeeds Review
Section titled Needs ReviewIn this example, Mergify will post the message “Thank you for your contribution! A reviewer will be assigned soon.” when a pull request is labeled with “needs review”.
pull_request_rules: - name: comment when a pull request is labeled "needs review" conditions: - label = needs review actions: comment: message: Thank you for your contribution! A reviewer will be assigned soon.Warn of Conflicting Pull Requests
Section titled Warn of Conflicting Pull RequestsWhen a pull request is in conflict and cannot be merged, it’s nice to be notified automatically by Mergify. You can do this using this rule:
pull_request_rules: - name: comment when a pull request is in conflict conditions: - conflict actions: comment: message: "@{{author}} Your PR is in conflict and cannot be merged."Merge Thank You
Section titled Merge Thank YouIn this example, Mergify will post the message “Thank you for your contribution! Your pull request has been merged.” when a pull request is merged.
pull_request_rules: - name: comment when a pull request is merged conditions: - merged actions: comment: message: Thank you for your contribution @{{author}}! Your pull request has been merged.Was this page helpful?
Thanks for your feedback!
bot_account#Bot account ornull·defaultnullMergify can impersonate a GitHub user to comment a pull request. If no
bot_accountis set, Mergify will comment the pull request itself.