This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new a5b455ff3a8 pre-commit: auto add table of contents with `doctoc`
(#11679)
a5b455ff3a8 is described below
commit a5b455ff3a8f4c86bed73ca4b2293d1fc5c86ea4
Author: John Bampton <[email protected]>
AuthorDate: Thu Nov 13 20:13:19 2025 +1000
pre-commit: auto add table of contents with `doctoc` (#11679)
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
---
.pre-commit-config.yaml | 19 +++++++++++--------
CONTRIBUTING.md | 18 ++++++++++++++++++
INSTALL.md | 18 +++++++++++++++---
README.md | 18 ++++++++++++++++++
4 files changed, 62 insertions(+), 11 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 9a306d126e7..4ff8e29f626 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -25,6 +25,12 @@ repos:
hooks:
- id: identity
- id: check-hooks-apply
+ - repo: https://github.com/thlorenz/doctoc.git
+ rev: v2.2.0
+ hooks:
+ - id: doctoc
+ name: Add TOC for Markdown files
+ files: ^CONTRIBUTING\.md$|^INSTALL\.md$|^README\.md$
- repo: https://github.com/oxipng/oxipng
rev: v9.1.5
hooks:
@@ -41,6 +47,11 @@ repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
+ - id: chmod
+ name: set file permissions
+ args: ['644']
+ files: \.md$
+ stages: [manual]
- id: insert-license
name: add license for all Markdown files
files: \.md$
@@ -117,14 +128,6 @@ repos:
args: [--config=.github/linters/.markdown-lint.yml]
types: [markdown]
files: \.(md|mdown|markdown)$
- - repo: https://github.com/Lucas-C/pre-commit-hooks
- rev: v1.5.5
- hooks:
- - id: chmod
- name: set file permissions
- args: ['644']
- files: \.md$
- stages: [manual]
- repo: https://github.com/adrienverge/yamllint
rev: v1.37.1
hooks:
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 57b7a716cd4..f0678ed7649 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -21,6 +21,24 @@
## Summary
+<!-- START doctoc generated TOC please keep comment here to allow auto update
-->
+<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
+
+- [Summary](#summary)
+- [Bug fixes](#bug-fixes)
+- [Developing new features](#developing-new-features)
+- [PendingReleaseNotes file](#pendingreleasenotes-file)
+- [Fork the code](#fork-the-code)
+- [Making changes](#making-changes)
+- [Rebase `feature_x` to include updates from
`upstream/main`](#rebase-feature_x-to-include-updates-from-upstreammain)
+- [Make a GitHub Pull Request to contribute your
changes](#make-a-github-pull-request-to-contribute-your-changes)
+- [Cleaning up after a successful pull
request](#cleaning-up-after-a-successful-pull-request)
+- [Release Principles](#release-principles)
+
+<!-- END doctoc generated TOC please keep comment here to allow auto update -->
+
+## Summary
+
This document covers how to contribute to the ACS project. ACS uses GitHub PRs
to manage code contributions.
These instructions assume you have a GitHub.com account, so if you don't have
one you will have to create one. Your proposed code changes will be published
to your own fork of the ACS project, and you will submit a Pull Request for
your changes to be added.
diff --git a/INSTALL.md b/INSTALL.md
index 0619b97f21c..52f109b0a41 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -26,9 +26,21 @@ or the developer
[wiki](https://cwiki.apache.org/confluence/display/CLOUDSTACK/H
Apache CloudStack developers use various platforms for development, this guide
was tested against a CentOS 7 x86_64 setup.
-* [Setting up development
environment](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Setting+up+CloudStack+Development+Environment)
for Apache CloudStack.
-*
[Building](https://cwiki.apache.org/confluence/display/CLOUDSTACK/How+to+build+CloudStack)
Apache CloudStack.
-* [Appliance based development](https://github.com/rhtyd/monkeybox)
+<!-- START doctoc generated TOC please keep comment here to allow auto update
-->
+<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
+
+- [Setting up Development Environment](#setting-up-development-environment)
+ - [Using jenv and/or pyenv for Version
Management](#using-jenv-andor-pyenv-for-version-management)
+- [Getting the Source Code](#getting-the-source-code)
+- [Building](#building)
+- [To bring up CloudStack UI](#to-bring-up-cloudstack-ui)
+- [Building with non-redistributable
plugins](#building-with-non-redistributable-plugins)
+- [Packaging and Installation](#packaging-and-installation)
+ - [Debian/Ubuntu](#debianubuntu)
+ - [RHEL/CentOS](#rhelcentos)
+- [Notes](#notes)
+
+<!-- END doctoc generated TOC please keep comment here to allow auto update -->
## Setting up Development Environment
diff --git a/README.md b/README.md
index a24131958a2..a5aacb49f6b 100644
--- a/README.md
+++ b/README.md
@@ -31,6 +31,24 @@
[](https://cloudstack.apache.org/)
+<!-- START doctoc generated TOC please keep comment here to allow auto update
-->
+<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
+
+- [Who Uses CloudStack?](#who-uses-cloudstack)
+- [Demo](#demo)
+- [Getting Started](#getting-started)
+- [Getting Source Repository](#getting-source-repository)
+- [Documentation](#documentation)
+- [News and Events](#news-and-events)
+- [Getting Involved and Contributing](#getting-involved-and-contributing)
+- [Reporting Security Vulnerabilities](#reporting-security-vulnerabilities)
+- [License](#license)
+- [Notice of Cryptographic Software](#notice-of-cryptographic-software)
+- [Star History](#star-history)
+- [Contributors](#contributors)
+
+<!-- END doctoc generated TOC please keep comment here to allow auto update -->
+
Apache CloudStack is open source software designed to deploy and manage large
networks of virtual machines, as a highly available, highly scalable
Infrastructure as a Service (IaaS) cloud computing platform. CloudStack is used