First attempt to add Doctor-RST#341
Open
RCheesley wants to merge 27 commits intomautic:5.xfrom
Open
Conversation
…cumentation into add-rst-linter
Contributor
There was a problem hiding this comment.
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.ymlworkflow 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 | ||
| ************************* | ||
| *********************** |
|
@RCheesley Test Comment... |
Member
Author
|
Thank you for reaching out. I am currently unavailable, but I have alerted the team who will respond as appropriate. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.