Skip to content

feat: add GitHub workflows for documentation quality checks#9

Merged
wtfsayo merged 2 commits intomainfrom
feat/add-github-workflows
Jul 11, 2025
Merged

feat: add GitHub workflows for documentation quality checks#9
wtfsayo merged 2 commits intomainfrom
feat/add-github-workflows

Conversation

@wtfsayo
Copy link
Member

@wtfsayo wtfsayo commented Jul 11, 2025

Summary

This PR adds two GitHub workflows that will help maintain documentation quality by automatically detecting and fixing common issues.

Added Workflows

1. Check Dead Links ()

  • Runs every 6 hours (or manually)
  • Scans all MDX/MD files for broken links
  • Automatically fixes broken links when possible:
    • Corrects typos in paths
    • Updates references to moved/renamed files
    • Resolves external link redirects
    • Adds comments for low-confidence fixes
  • Creates a PR with all fixes applied

2. Check Documentation Quality ()

  • Runs every 6 hours (or manually)
  • Detects and fixes documentation quality issues:
    • Double headers: Removes H1 headings when frontmatter title exists
    • Duplicate content: Consolidates or comments duplicated sections
    • Missing metadata: Adds missing frontmatter fields
    • Code formatting: Adds language tags to code blocks
    • Icon consistency: Replaces emojis with Mintlify icons
  • Creates a PR with all improvements

Benefits

  • 🔧 Automated maintenance reduces manual work
  • 📊 Consistent documentation quality
  • 🔗 No more broken links frustrating users
  • 🤖 Uses Claude AI for intelligent fixes
  • 👀 All changes go through PR review process

Requirements

These workflows require:

  • secret to be set in the repository
  • Appropriate GitHub Actions permissions (already configured in the workflows)

Testing

The workflows can be manually triggered from the Actions tab after merge.

wtfsayo added 2 commits July 11, 2025 13:43
- Add check-dead-links.yml for automated broken link detection and fixing

- Add check-documentation-quality.yml for duplicate content and formatting issues

- Both workflows run every 6 hours and create PRs with automated fixes
- Remove backticks from example text in YAML strings

- Properly indent PR body content in shell scripts
@coderabbitai
Copy link

coderabbitai bot commented Jul 11, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. 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.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/add-github-workflows

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds two GitHub Actions workflows to automate documentation maintenance by detecting and fixing issues in markdown and MDX files.

  • Introduces a scheduled "Check Documentation Quality" workflow for double headers, duplicate content, missing metadata, code block tags, and icon consistency.
  • Adds a scheduled "Check Dead Links" workflow to scan and automatically correct internal and external broken links.
  • Both workflows run every six hours (or manually), create a feature branch with fixes, and open a pull request with a summary of changes.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/check-documentation-quality.yml New workflow to auto-detect and apply fixes for documentation quality issues
.github/workflows/check-dead-links.yml New workflow to scan and auto-fix broken internal and external links
Comments suppressed due to low confidence (8)

.github/workflows/check-documentation-quality.yml:43

  • The action reference is misspelled as "anthropics/claude-code-action"; it should be "anthropic/claude-code-action@beta" to correctly reference the official repository.
        uses: anthropics/claude-code-action@beta

.github/workflows/check-documentation-quality.yml:43

  • Pin this action to a specific stable version or commit SHA instead of the floating "beta" tag to ensure reproducibility and security.
        uses: anthropics/claude-code-action@beta

.github/workflows/check-documentation-quality.yml:1

  • Add a concurrency section (for example, concurrency: \n group: check-documentation-quality) to prevent overlapping runs from creating conflicting branches.
name: Check Documentation Quality

.github/workflows/check-documentation-quality.yml:142

  • [nitpick] The commit prefix "fix:" may not align with conventional commit guidelines for documentation updates; consider using "docs:" or "chore:" to clarify the scope.
          git commit -m "fix: automated documentation quality improvements" \

.github/workflows/check-dead-links.yml:37

  • The action reference is misspelled as "anthropics/claude-code-action"; it should be "anthropic/claude-code-action@beta" to correctly reference the official repository.
        uses: anthropics/claude-code-action@beta

.github/workflows/check-dead-links.yml:37

  • Pin this action to a specific stable version or commit SHA instead of the floating "beta" tag to ensure reproducibility and security.
        uses: anthropics/claude-code-action@beta

.github/workflows/check-dead-links.yml:1

  • Add a concurrency section (for example, concurrency: \n group: check-dead-links) to prevent overlapping runs from creating conflicting branches.
name: Check Dead Links

.github/workflows/check-dead-links.yml:117

  • [nitpick] The commit prefix "fix:" may be misleading for documentation maintenance; consider using "docs:" or "chore:" to better reflect the purpose.
          git commit -m "fix: automated broken link fixes" \

@wtfsayo wtfsayo merged commit 569e3a1 into main Jul 11, 2025
2 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