Skip to content

Conversation

@teodorus-nathaniel
Copy link
Collaborator

@teodorus-nathaniel teodorus-nathaniel commented Dec 24, 2025

resolves https://github.com/holdex/pr-time-tracker-webhooks/issues/710

Summary by CodeRabbit

  • Chores
    • Enhanced commit message validation workflow with improved configuration detection and automatic setup
    • Optimized code formatting workflow with refined configuration detection and conditional dependency installation

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

@teodorus-nathaniel teodorus-nathaniel self-assigned this Dec 24, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 24, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Both GitHub Actions workflows now detect configuration files and conditionally handle installations. The commit-check workflow creates a default commitlint config if missing and installs dependencies based on config presence. The prettier workflow similarly detects config and installs dependencies only when found, using step outputs to drive conditional logic.

Changes

Cohort / File(s) Summary
GitHub Actions Config Detection & Conditional Logic
.github/workflows/commit-check.yml, .github/workflows/prettier.yml
Added config file detection steps with has-config outputs. Both workflows now conditionally install dependencies or create default configs. commit-check.yml also creates .commitlintrc.yml when config missing. New step IDs (commitlint-config, prettier-config) enable downstream conditional execution.

Sequence Diagram(s)

sequenceDiagram
    participant WF as Workflow
    participant FS as File System
    participant DM as Dependency Manager
    participant Lint as Linter

    rect rgb(240, 248, 255)
    Note over WF,FS: Config Detection Phase
    WF->>FS: Check for .commitlintrc.*<br/>or package.json config
    FS-->>WF: Config exists? (has-config)
    end

    alt Config Found
        rect rgb(220, 240, 220)
        Note over WF,DM: Local Dependencies Path
        WF->>DM: Install local dependencies
        DM-->>WF: Ready
        end
    else No Config
        rect rgb(255, 240, 220)
        Note over WF,FS: Config Creation Path
        WF->>FS: Create .commitlintrc.yml
        FS-->>WF: Config created
        WF->>DM: Install commitlint global<br/>+ conventional config
        DM-->>WF: Ready
        end
    end

    rect rgb(240, 240, 255)
    Note over WF,Lint: Linting Phase
    WF->>Lint: Run commitlint check
    Lint-->>WF: Results
    end
Loading
sequenceDiagram
    participant WF as Workflow
    participant FS as File System
    participant DM as Dependency Manager
    participant Prettier as Prettier

    rect rgb(240, 248, 255)
    Note over WF,FS: Config Detection Phase
    WF->>FS: Check for prettier config files
    FS-->>WF: Config exists? (has-config)
    end

    WF->>WF: Setup Bun
    WF->>WF: Install Prettier

    alt Config Found
        rect rgb(220, 240, 220)
        Note over WF,DM: Conditional Install
        WF->>DM: Install dependencies
        DM-->>WF: Ready
        end
    end

    rect rgb(240, 240, 255)
    Note over WF,Prettier: Formatting Check
    WF->>Prettier: Check formatting
    Prettier-->>WF: Results
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • zolotokrylin
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/plugin

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between df64550 and 22b2dbb.

📒 Files selected for processing (2)
  • .github/workflows/commit-check.yml
  • .github/workflows/prettier.yml

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.

@teodorus-nathaniel teodorus-nathaniel merged commit ada5d79 into main Dec 24, 2025
4 of 5 checks passed
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