-
Notifications
You must be signed in to change notification settings - Fork 253
Fix Vale action configuration for GitHub PR reviews #3509
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
Open
edmundmiller
wants to merge
5
commits into
main
Choose a base branch
from
fix/vale-configuration-improvements
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
10be56a
Modernize Vale configuration for GitHub PRs
edmundmiller 013f196
Remove node 20 from GitHub actions
edmundmiller 989c7bd
Add custom mdx2vast fork with directive support
edmundmiller 983e321
Complete Vale configuration
edmundmiller 5606726
Ignore old events and stuff
edmundmiller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,41 @@ | ||
| Astro | ||
| nf-core | ||
| Nextflow | ||
| Seqera | ||
| SeqeraLabs | ||
| Bytesize | ||
| Conda | ||
| Mamba | ||
| Bioconda | ||
| Singularity | ||
| Apptainer | ||
| Docker | ||
| GitHub | ||
| GitLab | ||
| Bitbucket | ||
| AWS | ||
| Azure | ||
| GCP | ||
| S3 | ||
| Kubernetes | ||
| Slurm | ||
| PBS | ||
| LSF | ||
| SGE | ||
| TORQUE | ||
| HTCondor | ||
| Podman | ||
| Charliecloud | ||
| Shifter | ||
| Spack | ||
| OpenEBench | ||
| MultiQC | ||
| FastQC | ||
| nf-test | ||
| DSL2 | ||
| Groovy | ||
| CWL | ||
| WDL | ||
| Snakemake | ||
| Prefect | ||
| Cromwell | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,26 +5,36 @@ on: | |
| - main | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| checks: write | ||
|
|
||
| jobs: | ||
| pre-commit: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | ||
| with: | ||
| node-version: 20 | ||
| - run: npm install --only=dev | ||
| - name: Install custom mdx2vast for MDX directive vale support | ||
| run: npm install -g https://github.com/edmundmiller/mdx2vast.git | ||
| - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 | ||
| vale: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
| - name: Install Vale | ||
| run: | | ||
| wget https://github.com/errata-ai/vale/releases/download/v3.0.5/vale_3.0.5_Linux_64-bit.tar.gz -O vale.tar.gz | ||
| tar -xvzf vale.tar.gz vale | ||
| rm vale.tar.gz | ||
| - name: Spell check | ||
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | ||
| - name: Install custom mdx2vast for MDX directive support | ||
| run: npm install -g https://github.com/edmundmiller/mdx2vast.git | ||
| - name: Verify Vale setup | ||
| run: | | ||
| ./vale sync | ||
| ./vale ${{inputs.DOC_SRC}} | ||
| echo "Vale config:" && cat .vale.ini | ||
| echo "mdx2vast installed:" && which mdx2vast | ||
| - uses: errata-ai/[email protected] | ||
| with: | ||
| files: sites/main-site/src/content,sites/docs/src/content,sites/configs/src/content,sites/modules-subworkflows/src/content,sites/pipelines/src/content | ||
| reporter: github-pr-check | ||
| fail_on_error: true | ||
| env: | ||
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,3 +9,12 @@ repos: | |
| - [email protected] | ||
| - [email protected] | ||
| files: \.(astro|svelte|mdx|md|yml|yaml)$ | ||
| - repo: https://github.com/errata-ai/vale | ||
| rev: v3.7.1 | ||
| hooks: | ||
| - id: vale | ||
| name: vale sync | ||
| pass_filenames: false | ||
| args: [sync] | ||
| - id: vale | ||
| args: [--output=line, --minAlertLevel=error] | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,87 @@ | ||
| StylesPath = .github/styles | ||
| MinAlertLevel = suggestion | ||
| MinAlertLevel = warning | ||
|
|
||
| Packages = https://github.com/nf-core/vale/releases/latest/download/nf-core.zip | ||
| Packages = MDX, https://github.com/nf-core/vale/releases/latest/download/nf-core.zip | ||
| Vocab = Docs | ||
|
|
||
| [*.md] | ||
| # Global settings for all Markdown and MDX files | ||
| [*.{md,mdx}] | ||
| BasedOnStyles = nf-core, Vale | ||
| Vale.Spelling = NO | ||
|
|
||
| [src/content/events/**] | ||
| # Blog posts - apply standard rules with relaxed personal pronouns | ||
| [sites/main-site/src/content/blog/**/*.{md,mdx}] | ||
| BasedOnStyles = nf-core, Vale | ||
| Vale.Spelling = NO | ||
| nf-core.We = NO | ||
| nf-core.SeqeraLabs = NO | ||
|
|
||
| [src/content/events/2024] | ||
| nf-core.SeqeraLabs = YES | ||
| # Documentation - stricter rules for formal documentation | ||
| [sites/docs/src/content/**/*.{md,mdx}] | ||
| BasedOnStyles = nf-core, Vale | ||
| Vale.Spelling = NO | ||
|
|
||
|
|
||
| # Component and pipeline pages | ||
| [sites/modules-subworkflows/src/content/**/*.{md,mdx}] | ||
| BasedOnStyles = nf-core, Vale | ||
| Vale.Spelling = NO | ||
|
|
||
| [sites/pipelines/src/content/**/*.{md,mdx}] | ||
| BasedOnStyles = nf-core, Vale | ||
| Vale.Spelling = NO | ||
|
|
||
| [src/content/events/*/bytesize_*.md] | ||
| # Config pages | ||
| [sites/configs/src/content/**/*.{md,mdx}] | ||
| BasedOnStyles = nf-core, Vale | ||
| Vale.Spelling = NO | ||
|
|
||
| # Ignore API reference documentation (auto-generated) - must be at end | ||
| [sites/docs/src/content/api_reference/**/*.md] | ||
| BasedOnStyles = | ||
|
|
||
| [sites/docs/src/content/api_reference/**/*.mdx] | ||
| BasedOnStyles = | ||
|
|
||
| # Ignore events from previous years only (2024 and before) - must be at end | ||
| [sites/main-site/src/content/events/2018/**/*.md] | ||
| BasedOnStyles = | ||
|
|
||
| [sites/main-site/src/content/events/2019/**/*.md] | ||
| BasedOnStyles = | ||
|
|
||
| [sites/main-site/src/content/events/2020/**/*.md] | ||
| BasedOnStyles = | ||
|
|
||
| [sites/main-site/src/content/events/2021/**/*.md] | ||
| BasedOnStyles = | ||
|
|
||
| [sites/main-site/src/content/events/2022/**/*.md] | ||
| BasedOnStyles = | ||
|
|
||
| [sites/main-site/src/content/events/2023/**/*.md] | ||
| BasedOnStyles = | ||
|
|
||
| [sites/main-site/src/content/events/2024/**/*.md] | ||
| BasedOnStyles = | ||
|
|
||
| [sites/main-site/src/content/events/2018/**/*.mdx] | ||
| BasedOnStyles = | ||
|
|
||
| [sites/main-site/src/content/events/2019/**/*.mdx] | ||
| BasedOnStyles = | ||
|
|
||
| [sites/main-site/src/content/events/2020/**/*.mdx] | ||
| BasedOnStyles = | ||
|
|
||
| [sites/main-site/src/content/events/2021/**/*.mdx] | ||
| BasedOnStyles = | ||
|
|
||
| [sites/main-site/src/content/events/2022/**/*.mdx] | ||
| BasedOnStyles = | ||
|
|
||
| [sites/main-site/src/content/events/2023/**/*.mdx] | ||
| BasedOnStyles = | ||
|
|
||
| [sites/main-site/src/content/events/2024/**/*.mdx] | ||
| BasedOnStyles = | ||
|
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| { | ||
| "recommendations": [ | ||
| // Documentation and linting | ||
| "errata-ai.vale-server", | ||
| "davidanson.vscode-markdownlint", | ||
| "streetsidesoftware.code-spell-checker", | ||
|
|
||
| // Formatting and Prettier | ||
| "esbenp.prettier-vscode", | ||
|
|
||
| // Astro and web development | ||
| "astro-build.astro-vscode", | ||
| "bradlc.vscode-tailwindcss", | ||
|
|
||
| // YAML and configuration files | ||
| "redhat.vscode-yaml", | ||
|
|
||
| // Git and version control | ||
| "eamodio.gitlens", | ||
|
|
||
| // Commitizen support | ||
| "commitizen.git-conventional-commits", | ||
|
|
||
| // Link checking (if available) | ||
| "tchayen.markdown-links" | ||
| ], | ||
| "unwantedRecommendations": [] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,48 @@ | ||
| { | ||
| "markdown.styles": [ | ||
| "public/vscode_markdown.css" | ||
| ] | ||
| ], | ||
|
|
||
| "// Documentation linting and formatting": "", | ||
| "vale.valeCLI.config": ".vale.ini", | ||
| "vale.valeCLI.path": "vale", | ||
| "vale.core.useCLI": true, | ||
|
|
||
| "[markdown]": { | ||
| "editor.defaultFormatter": "esbenp.prettier-vscode", | ||
| "editor.formatOnSave": true, | ||
| "editor.rulers": [120], | ||
| "editor.wordWrap": "wordWrapColumn", | ||
| "editor.wordWrapColumn": 120 | ||
| }, | ||
|
|
||
| "// MDX settings": "", | ||
| "[mdx]": { | ||
| "editor.defaultFormatter": "esbenp.prettier-vscode", | ||
| "editor.formatOnSave": true, | ||
| "editor.rulers": [120], | ||
| "editor.wordWrap": "wordWrapColumn", | ||
| "editor.wordWrapColumn": 120 | ||
| }, | ||
|
|
||
| "// YAML settings": "", | ||
| "[yaml]": { | ||
| "editor.defaultFormatter": "esbenp.prettier-vscode", | ||
| "editor.formatOnSave": true, | ||
| "editor.insertSpaces": true, | ||
| "editor.tabSize": 2 | ||
| }, | ||
|
|
||
| "// Astro settings": "", | ||
| "[astro]": { | ||
| "editor.defaultFormatter": "esbenp.prettier-vscode", | ||
| "editor.formatOnSave": true | ||
| }, | ||
|
|
||
| "// File explorer": "", | ||
| "files.exclude": { | ||
| "**/node_modules": true, | ||
| "**/dist": true, | ||
| "**/.astro": true | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we need this, but it's not a blocker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh we should actually not accept that.
Maybe in the links to GitHub repos?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't actually know how Vale reconciles code. If we are referring to SeqeraLabs, it's probably as part of a repository, so it should be in
seqeralabs. Anything else should be Seqera.