feat(ci): add org-default markdownlint config with workflow fallback#91
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request establishes a standardized markdownlint configuration for the organization, improving consistency in documentation and markdown files across various repositories. It introduces a central default configuration while maintaining flexibility for individual projects to customize rules. This change streamlines the CI process by automatically applying these standards and specifically addresses compatibility with "release-please" generated changelogs. Highlights
Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Code clean and neat, Markdown shines, no errors found, CI gives its nod. Footnotes
|
There was a problem hiding this comment.
Pull request overview
This PR introduces an organization-default markdownlint-cli2 configuration and updates the reusable Markdown lint workflow to automatically use it when a calling repository does not define its own markdownlint config.
Changes:
- Add org-wide markdownlint defaults at
configs/.markdownlint-cli2.yaml(including CHANGELOG-specific overrides). - Update
.github/workflows/_markdown-lint.ymlto download the org-default config when no local markdownlint config is present.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
configs/.markdownlint-cli2.yaml |
Adds baseline markdownlint rules and per-file overrides (e.g., CHANGELOG). |
.github/workflows/_markdown-lint.yml |
Adds a fallback step to fetch the org-default config before running markdownlint. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Set line_length to 160 (strict), with 80 for code blocks and headings. Tables checked at 160 like general content. CHANGELOG.md remains exempt. (claude)
Summary
configs/.markdownlint-cli2.yaml_markdown-lint.ymlto auto-download org defaults when repos lack local config.markdownlint-cli2.yamlfor overridesTest plan
Greptile Summary
This PR introduces an org-wide markdownlint config fallback mechanism. The reusable
_markdown-lint.ymlworkflow now checks whether the calling repo has any local markdownlint config; if not, it downloads the org default fromconfigs/.markdownlint-cli2.yaml. The default config is minimal and pragmatic — it relaxes MD024 to allow sibling duplicate headings (standard for changelogs) and disables MD013 line-length enforcement specifically forCHANGELOG.mdfiles generated by release-please.hashFilesguard in the workflow is missing.markdownlint-cli2.jsonc— the primary config format for markdownlint-cli2 — along with.markdownlint.cjsand.markdownlint.mjs. A repo using any of these would have its config silently overwritten by the org default.curlfallback approach using${{ github.repository_owner }}is a nice touch for fork compatibility.configs/.markdownlint-cli2.yamlis clean, well-commented, and follows the markdownlint-cli2 schema correctly.Confidence Score: 3/5
.markdownlint-cli2.jsonc(and two other formats) in the hashFiles check is a real bug that could silently overwrite a repo's local config. This isn't a showstopper for the current org repos (which use.markdownlint.json), but it's a latent issue for any repo that adopts the primary markdownlint-cli2 config format..github/workflows/_markdown-lint.yml— thehashFilescondition needs the complete set of markdownlint config filenamesImportant Files Changed
hashFilesguard, but the guard is missing.markdownlint-cli2.jsonc(the primary config format) plus.markdownlint.cjsand.markdownlint.mjs, which could cause silent config overwrites in repos using those formats.siblings_onlyfor changelogs and MD013 disabled forCHANGELOG.mdto accommodate release-please output. No issues found.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Calling repo triggers _markdown-lint.yml] --> B[Checkout repo] B --> C{hashFiles checks:\nany local markdownlint config?} C -->|Config found| E[Run markdownlint-cli2\nwith local config] C -->|No config found| D["curl org default from\nconfigs/.markdownlint-cli2.yaml"] D --> E E --> F{Lint result} F -->|Pass| G[✅ Job succeeds] F -->|Fail| H[❌ Job fails with violations]Prompt To Fix All With AI
Last reviewed commit: b921213