Skip to content

Conversation

@MrSubidubi
Copy link
Contributor

@MrSubidubi MrSubidubi commented Dec 4, 2025

This PR adds support for paths_ignore as described in https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#onpushpull_requestpull_request_targetpathspaths-ignore. I also added paths to the PullRequestTarget, as that is also supported per the documentation.

Summary by CodeRabbit

  • New Features
    • Added path-based filtering to pull request and push workflow triggers, enabling workflows to execute only when specified paths are modified.
    • Added path ignore functionality to exclude specific paths from triggering workflows.
    • Updated configuration field naming to use standard kebab-case format for improved consistency.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 4, 2025

Walkthrough

Added path filtering semantics to GitHub workflow event structures by introducing paths and paths_ignore fields to PullRequest, PullRequestTarget, and Push structs. Applied kebab-case serde renaming and implemented fluent builder methods for path and ignore-path manipulation.

Changes

Cohort / File(s) Summary
Path filtering configuration
crates/gh-workflow/src/event.rs
Added paths_ignore field to PullRequest, PullRequestTarget, and Push structs; added paths field to PullRequestTarget and Push. All new fields support serde with kebab-case renaming.
Fluent builder methods
crates/gh-workflow/src/event.rs
Implemented add_path() and add_ignored_path() methods for PullRequest, PullRequestTarget, and Push to enable programmatic configuration of path filters.
Serde configuration
crates/gh-workflow/src/event.rs
Applied #[serde(rename_all = "kebab-case")] derive attribute to PullRequest, PullRequestTarget, and Push for consistent JSON field naming.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify serde annotations correctly map field names to kebab-case in serialized output
  • Confirm fluent builder methods properly consume and return self without mutation issues
  • Ensure consistency of method naming and behavior across the three modified structs
  • Validate that skip_serializing_if = "Vec::is_empty" correctly omits empty path vectors from serialization

Possibly related PRs

Suggested reviewers

  • tusharmath

Poem

Paths we filter, left and right,
Kebab-case fields burning bright,
Fluent builders, hop and build,
With workflows now completely thrilled! 🐰✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately describes the main change: adding paths_ignore support to push, pull request, and pull request target events.
Docstring Coverage ✅ Passed Docstring coverage is 88.89% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 04a1093 and 9b69c8a.

📒 Files selected for processing (1)
  • crates/gh-workflow/src/event.rs (8 hunks)
🔇 Additional comments (3)
crates/gh-workflow/src/event.rs (3)

638-677: LGTM! Consistent implementation of path filtering.

The addition of paths and paths_ignore fields with corresponding builder methods brings PullRequestTarget to parity with PullRequest for path-based filtering. The implementation follows the established pattern and maintains consistency across event types.


683-717: LGTM! Path filtering enhancement is complete.

The addition of paths_ignore field and add_ignored_path builder method completes the path filtering capabilities for push events. The implementation is consistent with PullRequest and PullRequestTarget structs.


536-571: The implementation correctly aligns with GitHub Actions syntax.

The #[serde(rename_all = "kebab-case")] attribute properly serializes paths_ignore to paths-ignore, matching GitHub Actions' workflow YAML convention. The add_ignored_path builder method correctly mirrors the existing paths/add_path functionality and maintains consistency across the struct implementation.


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.

@tusharmath tusharmath merged commit ff4a46d into tailcallhq:main Dec 4, 2025
4 checks passed
@MrSubidubi MrSubidubi deleted the paths-ignore branch December 4, 2025 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants