◐ Shell
clean mode source ↗

Native triggers for workflow dependency by ShaharNaveh · Pull Request #6253 · RustPython/RustPython

Caution

Review failed

The pull request is closed.

Walkthrough

The CI workflow now includes explicit push (main, release branches) and pull_request event triggers alongside existing merge_group and workflow_dispatch triggers. The PR auto-commit workflow transitions from direct pull_request_target triggers to a workflow_run trigger that activates after CI completion, with a conditional guard ensuring execution only for pull requests with successful CI runs.

Changes

Cohort / File(s) Summary
GitHub Actions workflow configuration
.github/workflows/ci.yaml
Added top-level "CI" workflow name, expanded triggers to include push (main, release branches) and pull_request events alongside existing merge_group and workflow_dispatch, removed duplicate header line.
GitHub Actions workflow configuration
.github/workflows/pr-auto-commit.yaml
Replaced pull_request_target trigger with workflow_run trigger (reacts to CI workflow completion), added conditional guard to run only when event is pull_request and CI workflow succeeded, removed wait-for-status-checks step, added concurrency with cancel-in-progress enabled.

Sequence Diagram

sequenceDiagram
    participant Developer
    participant PR as Pull Request
    participant CI as CI Workflow
    participant AutoCommit as PR Auto-Commit<br/>Workflow
    participant Repo as Repository

    Developer->>PR: Push commit or open PR
    PR->>CI: Trigger on push/pull_request events
    activate CI
    CI->>CI: Run tests, checks
    CI-->>Repo: Report completion status
    deactivate CI
    
    Note over AutoCommit: Listens for CI<br/>workflow_run completion
    CI-->>AutoCommit: Trigger workflow_run (on success)
    activate AutoCommit
    AutoCommit->>AutoCommit: Guard: Check if event<br/>is pull_request<br/>and CI succeeded
    AutoCommit->>AutoCommit: Run cargo fmt
    AutoCommit->>Repo: Commit & push formatted changes
    deactivate AutoCommit
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Review the new trigger configuration in ci.yaml to ensure correct branch patterns for push events
  • Verify the workflow_run trigger condition and job guard logic in pr-auto-commit.yaml properly filter for pull_request events and successful CI runs
  • Confirm the removal of wait-for-status-checks step doesn't introduce timing issues

Possibly related PRs

Suggested reviewers

  • youknowone

Poem

🐰 A workflow dance, now orchestrated clean,
CI runs first, the scene's serene,
Then auto-commit hops in with flair,
Formatting changes floating through the air!

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9ce8586 and 95d888b.

📒 Files selected for processing (2)
  • .github/workflows/ci.yaml (1 hunks)
  • .github/workflows/pr-auto-commit.yaml (2 hunks)

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.