From 4af975385658b70d7088c5a18566d7bae1874cd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Tue, 22 Oct 2024 10:10:15 +0200 Subject: [PATCH 01/19] RHIDP-4533 test documentation for style in GitHub pull requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabrice Flore-Thébault --- .github/workflows/style-guide.yml | 21 +++++++++++++++++++++ .gitignore | 1 - .vale-styles/DeveloperHub/tests/.vale.ini | 12 ++++++++++++ .vale.ini | 18 ++++++++++++++++++ 4 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/style-guide.yml create mode 100644 .vale-styles/DeveloperHub/tests/.vale.ini create mode 100644 .vale.ini diff --git a/.github/workflows/style-guide.yml b/.github/workflows/style-guide.yml new file mode 100644 index 0000000000..66198042bc --- /dev/null +++ b/.github/workflows/style-guide.yml @@ -0,0 +1,21 @@ +--- +name: Verify style guide compliance on pull request +on: [pull_request] + +jobs: + vale: + name: Linting with Vale + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: errata-ai/vale-action@reviewdog + with: + filter_mode: diff_context + vale_flags: "--no-exit --minAlertLevel=error" + reporter: github-pr-review + fail_on_error: true + env: + # Required, set by GitHub actions automatically: + # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret + GITHUB_TOKEN: ${{ secrets.RHDH_BOT_TOKEN }} + REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.RHDH_BOT_TOKEN }} diff --git a/.gitignore b/.gitignore index 483e61755e..cbacf51e7a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ titles/*/build index.html titles-generated/ -.vale.ini .vale-styles/RedHat .vscode .cache/ diff --git a/.vale-styles/DeveloperHub/tests/.vale.ini b/.vale-styles/DeveloperHub/tests/.vale.ini new file mode 100644 index 0000000000..85efd56479 --- /dev/null +++ b/.vale-styles/DeveloperHub/tests/.vale.ini @@ -0,0 +1,12 @@ +; .vale.ini +; Specifies Vale configuration +; See: https://redhat-documentation.github.io/vale-at-red-hat/docs/user-guide/installing-vale-cli/ +; +; Download and search Vale styles in this directory: +StylesPath = ../.. +; Minimum alert level to display: +MinAlertLevel = suggestion +; Display alerts on AsciiDoc files: +[*.adoc] +; Apply these styles: +BasedOnStyles = DeveloperHub diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 0000000000..a0d12bdfd1 --- /dev/null +++ b/.vale.ini @@ -0,0 +1,18 @@ +# .vale.ini +# Specifies Vale configuration +# See: https://redhat-documentation.github.io/vale-at-red-hat/docs/user-guide/installing-vale-cli/ +# + +# Download and search Vale styles in this directory: +StylesPath = ".vale-styles" + +# Minimum alert level to display: +MinAlertLevel = suggestion + +# Styles to download: +Packages = RedHat + +# Display alerts on AsciiDoc files: +[*.adoc] +# Apply these styles: +BasedOnStyles = RedHat,DeveloperHub From 85518e53b994f5158220327f796ac179ac550b6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Tue, 22 Oct 2024 10:26:08 +0200 Subject: [PATCH 02/19] Update .github/workflows/style-guide.yml --- .github/workflows/style-guide.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/style-guide.yml b/.github/workflows/style-guide.yml index 66198042bc..55f9c1952c 100644 --- a/.github/workflows/style-guide.yml +++ b/.github/workflows/style-guide.yml @@ -8,6 +8,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Install Asciidoctor + run: sudo apt-get install -y asciidoctor - uses: errata-ai/vale-action@reviewdog with: filter_mode: diff_context From 291618494896609bfb9cff50957686ddf0524a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Tue, 22 Oct 2024 10:33:18 +0200 Subject: [PATCH 03/19] Update .github/workflows/style-guide.yml --- .github/workflows/style-guide.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/style-guide.yml b/.github/workflows/style-guide.yml index 55f9c1952c..3606cf232b 100644 --- a/.github/workflows/style-guide.yml +++ b/.github/workflows/style-guide.yml @@ -7,7 +7,7 @@ jobs: name: Linting with Vale runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Asciidoctor run: sudo apt-get install -y asciidoctor - uses: errata-ai/vale-action@reviewdog From fd4c2542d65a71ce2a0a9ccdf1c2370555901ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Tue, 22 Oct 2024 10:36:49 +0200 Subject: [PATCH 04/19] fix remove broken and unnecessary symlink MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabrice Flore-Thébault --- assemblies/images | 1 - 1 file changed, 1 deletion(-) delete mode 120000 assemblies/images diff --git a/assemblies/images b/assemblies/images deleted file mode 120000 index 5fa6987088..0000000000 --- a/assemblies/images +++ /dev/null @@ -1 +0,0 @@ -../../images \ No newline at end of file From 62f38c947309c6c336637b4f3693101bcd0516ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Tue, 22 Oct 2024 10:52:58 +0200 Subject: [PATCH 05/19] fix: removed broken and unnecessary symlinks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabrice Flore-Thébault --- .vale.ini.bak | 18 ++++++++++++++++++ titles/plugin-rhdh/admin | 1 - titles/plugin-rhdh/getting-started | 1 - titles/plugin-rhdh/installation | 1 - 4 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 .vale.ini.bak delete mode 120000 titles/plugin-rhdh/admin delete mode 120000 titles/plugin-rhdh/getting-started delete mode 120000 titles/plugin-rhdh/installation diff --git a/.vale.ini.bak b/.vale.ini.bak new file mode 100644 index 0000000000..a0d12bdfd1 --- /dev/null +++ b/.vale.ini.bak @@ -0,0 +1,18 @@ +# .vale.ini +# Specifies Vale configuration +# See: https://redhat-documentation.github.io/vale-at-red-hat/docs/user-guide/installing-vale-cli/ +# + +# Download and search Vale styles in this directory: +StylesPath = ".vale-styles" + +# Minimum alert level to display: +MinAlertLevel = suggestion + +# Styles to download: +Packages = RedHat + +# Display alerts on AsciiDoc files: +[*.adoc] +# Apply these styles: +BasedOnStyles = RedHat,DeveloperHub diff --git a/titles/plugin-rhdh/admin b/titles/plugin-rhdh/admin deleted file mode 120000 index 87a6c0d621..0000000000 --- a/titles/plugin-rhdh/admin +++ /dev/null @@ -1 +0,0 @@ -../../admin \ No newline at end of file diff --git a/titles/plugin-rhdh/getting-started b/titles/plugin-rhdh/getting-started deleted file mode 120000 index 557f806d93..0000000000 --- a/titles/plugin-rhdh/getting-started +++ /dev/null @@ -1 +0,0 @@ -../../getting-started \ No newline at end of file diff --git a/titles/plugin-rhdh/installation b/titles/plugin-rhdh/installation deleted file mode 120000 index 863ed577be..0000000000 --- a/titles/plugin-rhdh/installation +++ /dev/null @@ -1 +0,0 @@ -../../installation \ No newline at end of file From 35ebe244cbfd4f23a623e42bd1f67392d9257cf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Thu, 24 Oct 2024 04:50:32 +0200 Subject: [PATCH 06/19] Update .github/workflows/style-guide.yml Co-authored-by: Nick Boldt --- .github/workflows/style-guide.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/style-guide.yml b/.github/workflows/style-guide.yml index 3606cf232b..5796fe44be 100644 --- a/.github/workflows/style-guide.yml +++ b/.github/workflows/style-guide.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v4 - name: Install Asciidoctor run: sudo apt-get install -y asciidoctor - - uses: errata-ai/vale-action@reviewdog + - uses: errata-ai/vale-action@v2 with: filter_mode: diff_context vale_flags: "--no-exit --minAlertLevel=error" From 5a4146b3c27ceaf2cf0d74bcca1bc2125a4c412f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Mon, 4 Nov 2024 09:34:22 +0100 Subject: [PATCH 07/19] Update .github/workflows/style-guide.yml --- .github/workflows/style-guide.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/style-guide.yml b/.github/workflows/style-guide.yml index 5796fe44be..7fb7a2af22 100644 --- a/.github/workflows/style-guide.yml +++ b/.github/workflows/style-guide.yml @@ -16,8 +16,4 @@ jobs: vale_flags: "--no-exit --minAlertLevel=error" reporter: github-pr-review fail_on_error: true - env: - # Required, set by GitHub actions automatically: - # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret - GITHUB_TOKEN: ${{ secrets.RHDH_BOT_TOKEN }} - REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.RHDH_BOT_TOKEN }} + token: ${{ secrets.RHDH_BOT_TOKEN }} From 3fb8160d6cfd41ec148539bc00eee73f21fd76fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Mon, 4 Nov 2024 09:34:41 +0100 Subject: [PATCH 08/19] Update .github/workflows/style-guide.yml --- .github/workflows/style-guide.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/style-guide.yml b/.github/workflows/style-guide.yml index 7fb7a2af22..747ce7f342 100644 --- a/.github/workflows/style-guide.yml +++ b/.github/workflows/style-guide.yml @@ -16,4 +16,4 @@ jobs: vale_flags: "--no-exit --minAlertLevel=error" reporter: github-pr-review fail_on_error: true - token: ${{ secrets.RHDH_BOT_TOKEN }} + token: ${{ secrets.RHDH_BOT_TOKEN }} From 119f2b09827c827832de1642b4cd9d045499476c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Mon, 4 Nov 2024 10:45:36 +0100 Subject: [PATCH 09/19] Delete .vale.ini.bak --- .vale.ini.bak | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 .vale.ini.bak diff --git a/.vale.ini.bak b/.vale.ini.bak deleted file mode 100644 index a0d12bdfd1..0000000000 --- a/.vale.ini.bak +++ /dev/null @@ -1,18 +0,0 @@ -# .vale.ini -# Specifies Vale configuration -# See: https://redhat-documentation.github.io/vale-at-red-hat/docs/user-guide/installing-vale-cli/ -# - -# Download and search Vale styles in this directory: -StylesPath = ".vale-styles" - -# Minimum alert level to display: -MinAlertLevel = suggestion - -# Styles to download: -Packages = RedHat - -# Display alerts on AsciiDoc files: -[*.adoc] -# Apply these styles: -BasedOnStyles = RedHat,DeveloperHub From 9e4a6ab923f54fb52971ef5298b8951d7f2e9251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Mon, 4 Nov 2024 14:28:50 +0100 Subject: [PATCH 10/19] Update .github/workflows/style-guide.yml --- .github/workflows/style-guide.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/style-guide.yml b/.github/workflows/style-guide.yml index 747ce7f342..dfef177a33 100644 --- a/.github/workflows/style-guide.yml +++ b/.github/workflows/style-guide.yml @@ -17,3 +17,5 @@ jobs: reporter: github-pr-review fail_on_error: true token: ${{ secrets.RHDH_BOT_TOKEN }} + env: + REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.RHDH_BOT_TOKEN }} From e81a36f1dbd89bd78feccd89c5389691e2c7d722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Mon, 4 Nov 2024 14:51:23 +0100 Subject: [PATCH 11/19] Update .github/workflows/style-guide.yml --- .github/workflows/style-guide.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/style-guide.yml b/.github/workflows/style-guide.yml index dfef177a33..d493d1988d 100644 --- a/.github/workflows/style-guide.yml +++ b/.github/workflows/style-guide.yml @@ -18,4 +18,5 @@ jobs: fail_on_error: true token: ${{ secrets.RHDH_BOT_TOKEN }} env: + GITHUB_TOKEN: ${{ secrets.RHDH_BOT_TOKEN }} REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.RHDH_BOT_TOKEN }} From f034fd454da65b72578cb79117d6c41b58aa1321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Mon, 4 Nov 2024 14:53:32 +0100 Subject: [PATCH 12/19] Apply suggestions from code review --- .vale-styles/DeveloperHub/tests/.vale.ini | 2 +- .vale.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.vale-styles/DeveloperHub/tests/.vale.ini b/.vale-styles/DeveloperHub/tests/.vale.ini index 85efd56479..7b925bbc13 100644 --- a/.vale-styles/DeveloperHub/tests/.vale.ini +++ b/.vale-styles/DeveloperHub/tests/.vale.ini @@ -1,6 +1,6 @@ ; .vale.ini ; Specifies Vale configuration -; See: https://redhat-documentation.github.io/vale-at-red-hat/docs/user-guide/installing-vale-cli/ +; See: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/user-guide/installing-vale-cli/ ; ; Download and search Vale styles in this directory: StylesPath = ../.. diff --git a/.vale.ini b/.vale.ini index a0d12bdfd1..b3e6e7a295 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,6 +1,6 @@ # .vale.ini # Specifies Vale configuration -# See: https://redhat-documentation.github.io/vale-at-red-hat/docs/user-guide/installing-vale-cli/ +# See: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/user-guide/installing-vale-cli/ # # Download and search Vale styles in this directory: From 25ff13b4e2f5878f030df5268d6771fe3eec06d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Mon, 4 Nov 2024 15:30:02 +0100 Subject: [PATCH 13/19] Update .github/workflows/style-guide.yml --- .github/workflows/style-guide.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/style-guide.yml b/.github/workflows/style-guide.yml index d493d1988d..a977537833 100644 --- a/.github/workflows/style-guide.yml +++ b/.github/workflows/style-guide.yml @@ -10,7 +10,8 @@ jobs: - uses: actions/checkout@v4 - name: Install Asciidoctor run: sudo apt-get install -y asciidoctor - - uses: errata-ai/vale-action@v2 + - name: Run Vale on new and modified content + uses: errata-ai/vale-action@v2 with: filter_mode: diff_context vale_flags: "--no-exit --minAlertLevel=error" From df9b39af35a78d45567acac442dadd714fbf2bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Mon, 4 Nov 2024 15:30:32 +0100 Subject: [PATCH 14/19] Update .github/workflows/style-guide.yml --- .github/workflows/style-guide.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/style-guide.yml b/.github/workflows/style-guide.yml index a977537833..b7b3a5a678 100644 --- a/.github/workflows/style-guide.yml +++ b/.github/workflows/style-guide.yml @@ -13,6 +13,7 @@ jobs: - name: Run Vale on new and modified content uses: errata-ai/vale-action@v2 with: + files: assemblies filter_mode: diff_context vale_flags: "--no-exit --minAlertLevel=error" reporter: github-pr-review From 51bf9de839f8ee231356bf0604905e59305f11db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Mon, 4 Nov 2024 15:34:20 +0100 Subject: [PATCH 15/19] Update .github/workflows/style-guide.yml --- .github/workflows/style-guide.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/style-guide.yml b/.github/workflows/style-guide.yml index b7b3a5a678..d5e07a1eaf 100644 --- a/.github/workflows/style-guide.yml +++ b/.github/workflows/style-guide.yml @@ -17,7 +17,6 @@ jobs: filter_mode: diff_context vale_flags: "--no-exit --minAlertLevel=error" reporter: github-pr-review - fail_on_error: true token: ${{ secrets.RHDH_BOT_TOKEN }} env: GITHUB_TOKEN: ${{ secrets.RHDH_BOT_TOKEN }} From 881757312bc422f8de5090d55c972d04462582eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Mon, 4 Nov 2024 15:43:52 +0100 Subject: [PATCH 16/19] Update .github/workflows/style-guide.yml --- .github/workflows/style-guide.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/style-guide.yml b/.github/workflows/style-guide.yml index d5e07a1eaf..f20dece9fa 100644 --- a/.github/workflows/style-guide.yml +++ b/.github/workflows/style-guide.yml @@ -7,7 +7,8 @@ jobs: name: Linting with Vale runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - name: Install Asciidoctor run: sudo apt-get install -y asciidoctor - name: Run Vale on new and modified content From f100e78c3fecac5d5f5fc9dc3b96d7a9262d077f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Mon, 4 Nov 2024 15:46:46 +0100 Subject: [PATCH 17/19] Update .github/workflows/style-guide.yml --- .github/workflows/style-guide.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/style-guide.yml b/.github/workflows/style-guide.yml index f20dece9fa..e9275f0b96 100644 --- a/.github/workflows/style-guide.yml +++ b/.github/workflows/style-guide.yml @@ -15,8 +15,7 @@ jobs: uses: errata-ai/vale-action@v2 with: files: assemblies - filter_mode: diff_context - vale_flags: "--no-exit --minAlertLevel=error" + vale_flags: "--minAlertLevel=warning" reporter: github-pr-review token: ${{ secrets.RHDH_BOT_TOKEN }} env: From 8e7ea9eef1ab8b95e2f5a2d2bbd2826d43078731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Mon, 4 Nov 2024 15:48:54 +0100 Subject: [PATCH 18/19] Update .github/workflows/style-guide.yml --- .github/workflows/style-guide.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/style-guide.yml b/.github/workflows/style-guide.yml index e9275f0b96..91dd9b01df 100644 --- a/.github/workflows/style-guide.yml +++ b/.github/workflows/style-guide.yml @@ -12,7 +12,7 @@ jobs: - name: Install Asciidoctor run: sudo apt-get install -y asciidoctor - name: Run Vale on new and modified content - uses: errata-ai/vale-action@v2 + uses: errata-ai/vale-action@v2.1.1 with: files: assemblies vale_flags: "--minAlertLevel=warning" From 23a5b3fa107f58a9a798e506e4ab1c9faa66c561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Mon, 4 Nov 2024 15:49:40 +0100 Subject: [PATCH 19/19] Update .github/workflows/style-guide.yml --- .github/workflows/style-guide.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/style-guide.yml b/.github/workflows/style-guide.yml index 91dd9b01df..509d3dbc44 100644 --- a/.github/workflows/style-guide.yml +++ b/.github/workflows/style-guide.yml @@ -17,7 +17,6 @@ jobs: files: assemblies vale_flags: "--minAlertLevel=warning" reporter: github-pr-review - token: ${{ secrets.RHDH_BOT_TOKEN }} env: GITHUB_TOKEN: ${{ secrets.RHDH_BOT_TOKEN }} REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.RHDH_BOT_TOKEN }}