Skip to content

First attempt to add Doctor-RST#341

Open
RCheesley wants to merge 27 commits intomautic:5.xfrom
RCheesley:add-rst-linter
Open

First attempt to add Doctor-RST#341
RCheesley wants to merge 27 commits intomautic:5.xfrom
RCheesley:add-rst-linter

Conversation

@RCheesley
Copy link
Copy Markdown
Member

We've had a lot of PRs recently with incorrect RST markup which is breaking the build in a worst case, or causing lots of errors/broken headers in best case.

This GitHub Action should hopefully help resolve this by flagging up incorrect RST at PR creation.

Copilot AI review requested due to automatic review settings March 18, 2026 01:22
Copy link
Copy Markdown
Contributor

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 introduces DOCtor-RST linting to help catch invalid/misformatted reStructuredText in pull requests, reducing Sphinx build failures and noisy documentation warnings.

Changes:

  • Fix an RST section underline length in companies_overview.rst.
  • Add a DOCtor-RST rules configuration file under docs/.
  • Extend the existing linting.yml workflow to add a DOCtor-RST job (and adjust permissions for the prose/vale job).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
docs/companies/companies_overview.rst Adjusts a section underline to better conform to RST heading rules.
docs/.doctor-rst.yaml Adds DOCtor-RST rule configuration for documentation linting.
.github/workflows/linting.yml Adds a DOCtor-RST linting job and updates existing lint/build steps/permissions.

💡 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.

Comment on lines +65 to +73
- name: Extract base branch name
id: extract_base_branch
run: echo "branch=${GITHUB_BASE_REF:-${GITHUB_REF##*/}}" >> $GITHUB_ENV

- name: Get changed files
id: changed_files
run: |
git fetch origin ${{ env.branch }}:refs/remotes/origin/${{ env.branch }}
git diff --name-only origin/${{ env.branch }}...HEAD > changed_files.txt
Comment on lines +78 to +82
- name: "Cache DOCtor-RST"
uses: actions/cache@v3
with:
path: .cache
key: ${{ runner.os }}-doctor-rst-${{ env.branch }}
DOCS_DIR: 'docs/'
run: |
if [ -s changed_files.txt ]; then
xargs -a changed_files.txt docker run --rm -v $(pwd):/github/workspace oskarstark/doctor-rst:1.61.1 --short --error-format=github --cache-file=/github/workspace/.cache/doctor-rst.cache
id: changed_files
run: |
git fetch origin ${{ env.branch }}:refs/remotes/origin/${{ env.branch }}
git diff --name-only origin/${{ env.branch }}...HEAD > changed_files.txt
Comment on lines 11 to +12
Engagements/Points chart
*************************
***********************
@Nezma
Copy link
Copy Markdown

Nezma commented Mar 18, 2026

@RCheesley Test Comment...

@RCheesley
Copy link
Copy Markdown
Member Author

Thank you for reaching out. I am currently unavailable, but I have alerted the team who will respond as appropriate.

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.

4 participants