| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
WalkthroughConsolidates PR auto-formatting into an auto_format_pr job in .github/workflows/ci.yaml, removes the standalone .github/workflows/pr-auto-commit.yaml, and updates multiple CI jobs to depend on the new formatting gate while changing skip checks to be cancellation-aware plus skip:ci. Changes
Sequence Diagram(s)sequenceDiagram
participant PR as Pull Request
participant Auto as auto_format_pr (ci.yaml)
participant CI as Dependent CI Jobs
PR->>Auto: PR event triggers job
activate Auto
Auto->>Auto: checkout PR branch\ninstall rustfmt\nrun cargo fmt
Note over Auto: Detect formatting diffs
alt Formatting changes detected
Auto->>PR: git commit & push formatted changes
Auto->>PR: post PR comment instructing to pull latest changes
Auto-x Auto: exit (fails to signal author to sync)
else No formatting changes
Auto-->>Auto: complete successfully
end
deactivate Auto
Note right of CI: Jobs now have needs: auto_format_pr\nand condition: !cancelled() && !contains(labels,'skip:ci')
Auto->>CI: unblocks dependent jobs or triggers re-run if branch changed
activate CI
CI->>CI: run tests/lint/etc.
deactivate CI
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested labelsskip:ci Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
📜 Recent review details Configuration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro 📥 CommitsReviewing files that changed from the base of the PR and between 65549b2 and a577106. 📒 Files selected for processing (1)
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. ❤️ ShareComment @coderabbitai help to get the list of available commands and usage tips. |
Sorry, something went wrong.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1).github/workflows/ci.yaml (1)📜 Review details381-384: Add consistent conditional guards to lint job.
The lint job has needs: auto_format_pr but lacks the if: ${{ !cancelled() && !contains(...) }} conditional that other downstream jobs (rust_tests, exotic_targets, snippets_cpython, miri, wasm, wasm-wasi) include. This inconsistency could cause the lint job to run in scenarios where other jobs are skipped due to label-based filtering.
Apply this diff to add the conditional:
lint: name: Check Rust code with clippy + if: ${{ !cancelled() && !contains(github.event.pull_request.labels.*.name, 'skip:ci') }} needs: - auto_format_pr runs-on: ubuntu-latest
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📥 CommitsReviewing files that changed from the base of the PR and between 041dd30 and df498ad.
📒 Files selected for processing (2)Learnt from: ShaharNaveh Repo: RustPython/RustPython PR: 5932 File: .github/workflows/comment-commands.yml:18-24 Timestamp: 2025-07-10T10:08:43.330Z Learning: In GitHub Actions workflows for the RustPython project, the maintainer ShaharNaveh prefers to keep workflows simple and doesn't mind if steps fail when the desired state is already achieved (e.g., user already assigned to an issue). Avoid suggesting complex error handling for edge cases they don't consider problematic.
Learnt from: ShaharNaveh Repo: RustPython/RustPython PR: 5932 File: .github/workflows/comment-commands.yml:18-24 Timestamp: 2025-07-10T10:08:43.330Z Learning: In GitHub Actions workflows for the RustPython project, the maintainer ShaharNaveh prefers to keep workflows simple and doesn't mind if steps fail when the desired state is already achieved (e.g., user already assigned to an issue). Avoid suggesting complex error handling for edge cases they don't consider problematic.
Applied to files:
148-148: property "git_commit" is not defined in object type {git-commit: {conclusion: string; outcome: string; outputs: {string => string}}}
(expression)
167-167: "github.event.pull_request.head.ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks for more details
(expression)
174-174: property "git_commit" is not defined in object type {git-commit: {conclusion: string; outcome: string; outputs: {string => string}}}
(expression)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
Sorry, something went wrong.
|
@ShaharNaveh could you test this workflow with a mal-formatted commit? |
Sorry, something went wrong.
|
The main issue I encounter ATM is the fact that github actions prevents you from doing recursive calls to the workflow. I can't get the checks to trigger after the auto-format commit |
Sorry, something went wrong.
|
#6295 replaced it. Thank you for the work! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
closes #6272
Summary by CodeRabbit
Chores
Style