Skip to content
/ utils Public

Make it possible to specify custom config path#516

Merged
5ouma merged 2 commits intomainfrom
feat-pre-commit-config-path
Nov 20, 2025
Merged

Make it possible to specify custom config path#516
5ouma merged 2 commits intomainfrom
feat-pre-commit-config-path

Conversation

@5ouma
Copy link
Owner

@5ouma 5ouma commented Nov 20, 2025

Not only the prek default config path, specify it manually.

Not only prek default config path, specify manually.
@github-actions github-actions bot added 🎉 New Feature A new feature 🐙 GitHub Actions Common GitHub Actions updates 🚸 pre-commit Check the code with pre-commit hooks labels Nov 20, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 20, 2025

Caution

Review failed

Failed to post review comments

Walkthrough

Adds a new optional config input to the pre-commit GitHub Action, updates README usage, replaces hardcoded config file references with the input across the action, passes the path to prek via CLI and PREK_CONFIG, and adjusts cleanup to remove the referenced file.

Changes

Cohort / File(s) Summary
Documentation update
README.md
Adds example line showing config: /path/to/pre-commit-config.yml # Optional under 5ouma/utils/pre-commit@v0.6.0 usage.
Action inputs and runtime changes
pre-commit/action.yml
Adds public input config (default .pre-commit-config.yaml, not required); replaces hard-coded config path in hashFiles with inputs.config; passes config to prek via -ac and sets PREK_CONFIG env var; updates cleanup step to remove the file referenced by PREK_CONFIG.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Check for syntax problems in pre-commit/action.yml (e.g., stray quotes or YAML indentation in the cleanup command).
  • Verify all inputs.config usages are correct in hashFiles expressions and action step arguments.
  • Confirm PREK_CONFIG is correctly exported, used by prek invocation, and referenced in cleanup.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding support for specifying a custom pre-commit config path instead of using only the default.
Description check ✅ Passed The description relates to the changeset by indicating the goal of allowing manual specification of config paths rather than relying solely on prek defaults.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat-pre-commit-config-path

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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.

@5ouma 5ouma removed the 🐙 GitHub Actions Common GitHub Actions updates label Nov 20, 2025
@github-actions github-actions bot added the 🐙 GitHub Actions Common GitHub Actions updates label Nov 20, 2025
@5ouma 5ouma removed the 🐙 GitHub Actions Common GitHub Actions updates label Nov 20, 2025
@5ouma
Copy link
Owner Author

5ouma commented Nov 20, 2025

@coderabbitai approve

@coderabbitai
Copy link

coderabbitai bot commented Nov 20, 2025

✅ Actions performed

Comments resolved and changes approved.

@5ouma 5ouma merged commit 7eaf25d into main Nov 20, 2025
5 checks passed
@5ouma 5ouma deleted the feat-pre-commit-config-path branch November 20, 2025 02:32
@5ouma 5ouma bot mentioned this pull request Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎉 New Feature A new feature 🚸 pre-commit Check the code with pre-commit hooks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant