Skip to content

Comments

feat: Support configuration files in .github folder#355

Merged
shenxianpeng merged 5 commits intomainfrom
copilot/support-config-locate-at-github
Jan 31, 2026
Merged

feat: Support configuration files in .github folder#355
shenxianpeng merged 5 commits intomainfrom
copilot/support-config-locate-at-github

Conversation

Copy link
Contributor

Copilot AI commented Jan 31, 2026

Config files (cchk.toml, commit-check.toml) now supported in .github folder, following GitHub conventions used by Dependabot and Renovate.

Changes

Configuration search order:

  1. cchk.toml (root)
  2. commit-check.toml (root)
  3. .github/cchk.toml
  4. .github/commit-check.toml

Implementation:

  • Extended DEFAULT_CONFIG_PATHS in config.py
  • Updated _find_config_file() in util.py to search .github directory
  • Updated CLI help text and documentation

Example:

# Either location works:
# ./cchk.toml (higher priority)
# ./.github/cchk.toml

[checks]
message = true
branch = true

Fully backward compatible - root configs maintain priority.

Original prompt

This section details on the original issue you should resolve

<issue_title>support config locate at .github?</issue_title>
<issue_description>right now commit-check.toml or cchk.toml only supports local in the root folder.

It might be a good idea to support the location at .github folder</issue_description>

<agent_instructions>Please check if this is a good idea or best practice for other tools on GitHub. If it is a good idea, implement this idea with a pull request for me and Copilot to review the changes </agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@netlify
Copy link

netlify bot commented Jan 31, 2026

Deploy Preview for commit-check ready!

Name Link
🔨 Latest commit 9782a7f
🔍 Latest deploy log https://app.netlify.com/projects/commit-check/deploys/697db5efd39a08000821f6cc
😎 Deploy Preview https://deploy-preview-355--commit-check.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI changed the title [WIP] Add support for config location in .github folder Support configuration files in .github folder Jan 31, 2026
Copilot AI requested a review from shenxianpeng January 31, 2026 01:00
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jan 31, 2026
@shenxianpeng shenxianpeng changed the title Support configuration files in .github folder feat: Support configuration files in .github folder Jan 31, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 31, 2026

Merging this PR will degrade performance by 25.27%

❌ 1 regressed benchmark
✅ 150 untouched benchmarks
🆕 3 new benchmarks
⏩ 108 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
test_default_config_paths_constant 179.7 µs 240.4 µs -25.27%
🆕 test_load_config_github_commit_check_toml N/A 400.9 µs N/A
🆕 test_load_config_github_cchk_toml N/A 392.8 µs N/A
🆕 test_load_config_priority_root_over_github N/A 388.5 µs N/A

Comparing copilot/support-config-locate-at-github (9782a7f) with main (5eab803)

Open in CodSpeed

Footnotes

  1. 108 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@shenxianpeng shenxianpeng removed the documentation Improvements or additions to documentation label Jan 31, 2026
@shenxianpeng shenxianpeng marked this pull request as ready for review January 31, 2026 07:43
@shenxianpeng shenxianpeng requested a review from a team as a code owner January 31, 2026 07:43
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 31, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

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

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jan 31, 2026
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 31, 2026

Quality Gate Passed Quality Gate passed

Issues
0 New issues
5 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@shenxianpeng shenxianpeng merged commit cc5f58b into main Jan 31, 2026
33 of 34 checks passed
@shenxianpeng shenxianpeng deleted the copilot/support-config-locate-at-github branch January 31, 2026 08:01
@shenxianpeng shenxianpeng added minor A minor version bump and removed documentation Improvements or additions to documentation labels Jan 31, 2026
@codecov
Copy link

codecov bot commented Jan 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.51%. Comparing base (5eab803) to head (9782a7f).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #355      +/-   ##
==========================================
+ Coverage   93.22%   93.51%   +0.28%     
==========================================
  Files           8        8              
  Lines         694      694              
==========================================
+ Hits          647      649       +2     
+ Misses         47       45       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request minor A minor version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support config locate at .github?

2 participants