Skip to content

Conversation

jbampton
Copy link
Member

https://github.com/thlorenz/doctoc?tab=readme-ov-file#usage-as-a-git-hook

https://github.com/thlorenz/doctoc/releases/tag/v2.2.0

Generates table of contents for Markdown files inside local git repository.

Links are compatible with anchors generated by github or other sites.

Added TOC to 3 Markdown files.

Never have to create a TOC again just run: pre-commit run doctoc --all-files

  • CONTRIBUTING.md
  • INSTALL.md
  • README.md

So both Apache Airflow and Apache Sedona use doctoc:

https://github.com/apache/airflow/blob/eb4a8bc03c92d84e8238dcd76becb267ec8c3dd5/.pre-commit-config.yaml#L32

https://github.com/apache/sedona/blob/b0d86fda010e42f30b090aef1b2dbf06aa0a19d2/.pre-commit-config.yaml#L34

Description

This PR...

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

https://github.com/thlorenz/doctoc?tab=readme-ov-file#usage-as-a-git-hook

https://github.com/thlorenz/doctoc/releases/tag/v2.2.0

Generates table of contents for Markdown files inside local git repository.

Links are compatible with anchors generated by github or other sites.

Added TOC to 3 Markdown files.

Never have to create a TOC again just run: `pre-commit run doctoc --all-files`

- CONTRIBUTING.md
- INSTALL.md
- README.md

So both Apache Airflow and Apache Sedona use `doctoc`:

https://github.com/apache/airflow/blob/eb4a8bc03c92d84e8238dcd76becb267ec8c3dd5/.pre-commit-config.yaml#L32

https://github.com/apache/sedona/blob/b0d86fda010e42f30b090aef1b2dbf06aa0a19d2/.pre-commit-config.yaml#L34
Copy link

codecov bot commented Sep 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.39%. Comparing base (8eb6ddd) to head (c4bf0bf).
⚠️ Report is 83 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11679      +/-   ##
============================================
- Coverage     17.39%   17.39%   -0.01%     
+ Complexity    15285    15281       -4     
============================================
  Files          5889     5889              
  Lines        526183   526183              
  Branches      64242    64242              
============================================
- Hits          91542    91532      -10     
- Misses       424297   424307      +10     
  Partials      10344    10344              
Flag Coverage Δ
uitests 3.62% <ø> (ø)
unittests 18.44% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@vishesh92 vishesh92 left a comment

Choose a reason for hiding this comment

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

lgtm

@vishesh92 vishesh92 requested a review from Copilot October 13, 2025 10:48
Copy link
Contributor

@Copilot 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 automatic table of contents (TOC) generation for Markdown files using the doctoc pre-commit hook. The change aims to keep documentation organized with automatically maintained TOCs that are compatible with GitHub anchor links.

  • Added doctoc pre-commit hook configured to run on CONTRIBUTING.md, INSTALL.md, and README.md
  • Generated initial TOCs for the three target Markdown files with proper doctoc comment markers

Reviewed Changes

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

File Description
.pre-commit-config.yaml Added doctoc hook configuration to auto-generate TOCs for specific Markdown files
README.md Added auto-generated table of contents with doctoc markers
INSTALL.md Added auto-generated table of contents with doctoc markers
CONTRIBUTING.md Added auto-generated table of contents with doctoc markers

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants