-
-
Notifications
You must be signed in to change notification settings - Fork 56
ci: skip sloth when the PR author is the release-please bot
#312
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
WalkthroughThis pull request updates two GitHub Actions workflows. In the release-please workflow, the job name is changed from "Release" to "Create new release PR". In the sloth workflow, a new conditional step ("Skip for release-please") is added to bypass the Sloth check when the pull request is created by the release-please bot, and the Sloth step is renamed to "Run Sloth" to reflect its conditional execution. Changes
Sequence Diagram(s)sequenceDiagram
participant PR as Pull Request
participant Workflow as GitHub Actions Workflow
PR->>Workflow: Trigger pull request event
Workflow->>Workflow: Check author of PR
alt Authored by release-please bot
Workflow->>Workflow: Execute "Skip for release-please" step (skip Sloth check)
else Not from release-please bot
Workflow->>Workflow: Execute "Run Sloth" check
end
Poem
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
Documentation and Community
|
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/sloth.yml (1)
15-21: Conditional "Skip for release-please" Step ReviewThe new step "Skip for release-please" correctly checks if the pull request originates from the release-please bot using the fixed user id (41898282) and exits with a success status when matched. This design ensures that, for release-please PRs, the subsequent Sloth check is skipped.
Note: Consider adding an inline comment to clarify why the bot’s user id is hardcoded; this may help future maintainers if the bot’s id ever changes.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/release-please.yaml(1 hunks).github/workflows/sloth.yml(1 hunks)
🔇 Additional comments (2)
.github/workflows/release-please.yaml (1)
17-17: Job Name Update VerificationThe job name has been updated to "Create new release PR" for clarity. This cosmetic change aligns with the intended purpose and overall workflow improvements. Ensure that any downstream references (if present) reflect this naming update.
.github/workflows/sloth.yml (1)
22-23: "Run Sloth" Step Conditional ExecutionThe "Run Sloth" step now runs only if the "Skip for release-please" step was skipped (i.e., when the PR is not from the release-please bot). The condition
if: ${{ always() && steps.check_release_please.outcome == 'skipped' }}
ensures that the Sloth check executes only for PRs that aren’t automatically bypassed. This meets the PR objective by preventing the Sloth check for release-please PRs.Please verify that the behavior of the
steps.check_release_please.outcomefield is consistent across different GitHub Actions runners, as a successful "Skip" step typically yields an outcome of "success" (thus preventing "Run Sloth" from executing), while for non-release-please PRs the step is skipped (yielding "skipped") and allowing "Run Sloth" to run as desired.
Summary by CodeRabbit