-
Notifications
You must be signed in to change notification settings - Fork 2
chore: add pr-comments workflow with default messages #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughA new GitHub Actions workflow file ( Changes
Sequence Diagram(s)sequenceDiagram
participant PR as Pull Request Event
participant GH as GitHub Actions
participant WC as pr-comments Workflow
participant EW as External Workflow (pr-auto-comments)
PR->>GH: Trigger event (open, ready, or close)
GH->>WC: Start pr-comments job
WC->>EW: Invoke external workflow with GH_PAT_AUTO_COMMENTS and org "RequestNetwork"
EW-->>WC: Execute auto-comment posting
WC-->>GH: Job completion
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/pr-comments.yml (1)
7-15
: Job Definition Using an External Workflow
The job correctly references an external workflow (pr-auto-comments.yml
) from the "RequestNetwork/auto-comments" repository. The use of thewith
block to passorg_name
and the proper injection of the secret token via${{ secrets.GH_PAT_AUTO_COMMENTS }}
is well implemented. One suggestion is to consider pinning the external workflow to a specific commit hash instead of using the@main
ref to prevent unexpected changes from upstream in the future.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/pr-comments.yml
(1 hunks)
🔇 Additional comments (2)
.github/workflows/pr-comments.yml (2)
1-2
: Workflow Naming Clarity
The workflow name "PR Comments" clearly reflects the intent to post comments on pull requests. Consider adding a brief description via comments if further context is desired later.
3-6
: Appropriate Trigger Configuration
The workflow is triggered on pull request events (opened, ready for review, closed) using thepull_request_target
event. This is suitable for workflows that require access to repository secrets. Just be sure that the elevated privileges inherent withpull_request_target
are acceptable given your security posture.
Description
This Pull Request adds the
pr-comments.yml
workflow which posts customizable comments on Pull Requests submitted by external contributors (those outside the RequestNetwork organization).The workflow leaves comments in these situations:
Details
It uses the
GH_PAT_AUTO_COMMENTS
organization secret which is a Personal Access Token provided by @MantisClone (me). Thus, the comments look like they're being posted by me.Default messages
First PR Comment:
Ready for Review Comment:
Merged Comment:
Test
This test pull request created by an external user shows 3 messages being sent at the appropriate times.
Context
Towards:
Considerations
pr-comments.yml
workflow is installed using the@main
tag so this repo will pull the latest default messages from the auto-comments repo as soon as they're merged to themain
branch.Reference
Summary by CodeRabbit