Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(doc): add valeCLI github action to automatically lint extension … #88

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

lmartella1
Copy link
Contributor

@lmartella1 lmartella1 commented Jun 14, 2024

This pull request introduces a new GitHub Action that uses Vale to lint our project's documentation. Vale is a syntax-aware linter for prose that we can use to enforce style and consistency across our documentation.

The new workflow, defined in .github/workflows/lint-with-vale.yml, is triggered on the pull_request_target event. This allows the workflow to post review comments on pull requests from forked repositories, as it runs in the context of the base repository and has the necessary write permissions.

The Vale Action is configured to check the files in the ./docs/modules/ROOT/pages/ directory. It uses the github-pr-review reporter to post the linting results as a pull request review. If any issues are found, the workflow will fail, ensuring that we maintain a high standard of quality for our documentation.

@lmartella1 lmartella1 requested a review from a team as a code owner June 14, 2024 07:12
@lmartella1 lmartella1 force-pushed the add-vale-cli branch 6 times, most recently from 52b8bb3 to 69b03fa Compare June 14, 2024 09:24
@@ -0,0 +1,20 @@
name: lint-with-vale.yml
on: [pull_request_target]
Copy link
Member

Choose a reason for hiding this comment

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

Seems possible to filter on the file paths to not trigger the worlflow at all if no doc is modified ?
cf https://github.com/quarkusio/quarkus/blob/main/.github/workflows/vale.yml#L7

files: ./docs/modules/ROOT/pages/
filter_mode: added
reporter: github-pr-review
fail_on_error: true
Copy link
Member

Choose a reason for hiding this comment

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

Might be a bit risky at the begining (risk of false positives due to vale->adoc bugs) ?

@lmartella1 lmartella1 merged commit 7d9b367 into quarkiverse:main Jun 14, 2024
1 check 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