From 1e7d7cf524bcf68b0d697fe838bb729a2983c804 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Wed, 8 May 2024 16:13:48 -0400 Subject: [PATCH 1/4] docs: refactor navbar and sidebar out of config (#4523) Signed-off-by: Rui Chen --- .gitignore | 7 ++- package.json | 4 +- pnpm-lock.yaml | 34 +++++----- runatlantis.io/.vuepress/config.js | 96 ++--------------------------- runatlantis.io/.vuepress/navbar.js | 8 +++ runatlantis.io/.vuepress/sidebar.js | 88 ++++++++++++++++++++++++++ 6 files changed, 125 insertions(+), 112 deletions(-) create mode 100644 runatlantis.io/.vuepress/navbar.js create mode 100644 runatlantis.io/.vuepress/sidebar.js diff --git a/.gitignore b/.gitignore index a3040a1ee5..3306e4c23b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ output .cover .terraform/ node_modules/ -**/.vuepress/* helm/test-values.yaml *.swp golangci-lint @@ -27,3 +26,9 @@ tmp-CHANGELOG.md # IDE files *.code-workspace + +# vuepress +**/.vuepress/* +!runatlantis.io/.vuepress/config.* +!runatlantis.io/.vuepress/navbar.* +!runatlantis.io/.vuepress/sidebar.* diff --git a/package.json b/package.json index 656ca4edcb..e592319d4e 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "@vuepress/theme-default": "2.0.0-rc.21", "@vuepress/utils": "2.0.0-rc.9", "sass-loader": "14.1.1", - "vuepress": "2.0.0-rc.9", - "vue": "3.4.21" + "vue": "3.4.21", + "vuepress": "2.0.0-rc.9" }, "scripts": { "website:dev": "vuepress dev runatlantis.io", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7ce183f4b4..9b731943df 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -644,26 +644,26 @@ packages: resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} dependencies: '@types/connect': 3.4.38 - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/bonjour@3.5.13: resolution: {integrity: sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/connect-history-api-fallback@1.5.4: resolution: {integrity: sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw==} dependencies: '@types/express-serve-static-core': 4.17.43 - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/connect@3.4.38: resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/debug@4.1.12: @@ -693,7 +693,7 @@ packages: /@types/express-serve-static-core@4.17.43: resolution: {integrity: sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.11 '@types/qs': 6.9.14 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -712,7 +712,7 @@ packages: resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==} dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/hash-sum@1.0.2: @@ -730,7 +730,7 @@ packages: /@types/http-proxy@1.17.14: resolution: {integrity: sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/json-schema@7.0.15: @@ -740,7 +740,7 @@ packages: /@types/jsonfile@6.1.4: resolution: {integrity: sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/linkify-it@3.0.5: @@ -779,15 +779,15 @@ packages: /@types/node-forge@1.3.11: resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/node@17.0.45: resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} dev: true - /@types/node@20.11.30: - resolution: {integrity: sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==} + /@types/node@20.12.11: + resolution: {integrity: sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==} dependencies: undici-types: 5.26.5 dev: true @@ -807,14 +807,14 @@ packages: /@types/sax@1.2.7: resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/send@0.17.4: resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==} dependencies: '@types/mime': 1.3.5 - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/serve-index@1.9.4: @@ -828,13 +828,13 @@ packages: dependencies: '@types/http-errors': 2.0.4 '@types/mime': 3.0.4 - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/sockjs@0.3.36: resolution: {integrity: sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@types/web-bluetooth@0.0.20: @@ -848,7 +848,7 @@ packages: /@types/ws@8.5.10: resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.11 dev: true /@vue/compiler-core@3.4.21: @@ -3015,7 +3015,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.11 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true diff --git a/runatlantis.io/.vuepress/config.js b/runatlantis.io/.vuepress/config.js index bb7d65949c..fb042ca3c3 100644 --- a/runatlantis.io/.vuepress/config.js +++ b/runatlantis.io/.vuepress/config.js @@ -5,6 +5,8 @@ import { defaultTheme } from '@vuepress/theme-default'; import { defineUserConfig } from 'vuepress'; import { sitemapPlugin } from '@vuepress/plugin-sitemap'; import { webpackBundler } from '@vuepress/bundler-webpack'; +import navbar from "./navbar"; +import sidebar from "./sidebar"; const __dirname = getDirname(import.meta.url) @@ -85,12 +87,7 @@ export default defineUserConfig({ locales: { '/': { selectLanguageName: 'English', - navbar: [ - { text: 'Home', link: '/' }, - { text: 'Guide', link: '/guide/' }, - { text: 'Docs', link: '/docs/' }, - { text: 'Blog', link: 'https://medium.com/runatlantis' }, - ], + navbar: navbar.en, }, /* '/es/': { @@ -104,92 +101,7 @@ export default defineUserConfig({ }, */ }, - sidebar: { - '/guide/': [ - '/guide/', - '/guide/test-drive', - '/guide/testing-locally', - ], - '/docs/': [ - { - text: 'Installing Atlantis', - collapsible: true, - children: [ - '/docs/installation-guide', - '/docs/requirements', - '/docs/access-credentials', - '/docs/webhook-secrets', - '/docs/deployment', - '/docs/configuring-webhooks', - '/docs/provider-credentials', - ] - }, - { - text: 'Configuring Atlantis', - collapsible: true, - children: [ - { - text: 'Overview', - link: '/docs/configuring-atlantis', - }, - '/docs/server-configuration', - '/docs/server-side-repo-config', - '/docs/pre-workflow-hooks', - '/docs/post-workflow-hooks', - '/docs/policy-checking', - '/docs/custom-workflows', - '/docs/repo-level-atlantis-yaml', - '/docs/upgrading-atlantis-yaml', - '/docs/command-requirements', - '/docs/checkout-strategy', - '/docs/terraform-versions', - '/docs/terraform-cloud', - '/docs/using-slack-hooks', - '/docs/stats', - '/docs/faq', - ] - }, - { - text: 'Using Atlantis', - collapsible: true, - children: [ - { - text: 'Overview', - link: '/docs/using-atlantis', - }, - '/docs/api-endpoints', - ] - }, - { - text: 'How Atlantis Works', - collapsible: true, - children: [ - { - text: 'Overview', - link: '/docs/how-atlantis-works', - }, - '/docs/locking', - '/docs/autoplanning', - '/docs/automerging', - '/docs/security', - ] - }, - { - text: 'Real-time Terraform Logs', - collapsible: true, - children: [ - '/docs/streaming-logs', - ] - }, - { - text: 'Troubleshooting', - collapsible: true, - children: [ - '/docs/troubleshooting-https', - ] - } - ] - }, + sidebar: sidebar.en, repo: 'runatlantis/atlantis', docsDir: 'runatlantis.io', editLink: true, diff --git a/runatlantis.io/.vuepress/navbar.js b/runatlantis.io/.vuepress/navbar.js new file mode 100644 index 0000000000..d7f86e1542 --- /dev/null +++ b/runatlantis.io/.vuepress/navbar.js @@ -0,0 +1,8 @@ +const en = [ + { text: 'Home', link: '/' }, + { text: 'Guide', link: '/guide/' }, + { text: 'Docs', link: '/docs/' }, + { text: 'Blog', link: 'https://medium.com/runatlantis' }, +]; + +export default { en }; diff --git a/runatlantis.io/.vuepress/sidebar.js b/runatlantis.io/.vuepress/sidebar.js new file mode 100644 index 0000000000..67caab55f3 --- /dev/null +++ b/runatlantis.io/.vuepress/sidebar.js @@ -0,0 +1,88 @@ +const en = { + '/guide/': [ + '/guide/', + '/guide/test-drive', + '/guide/testing-locally', + ], + '/docs/': [ + { + text: 'Installing Atlantis', + collapsible: true, + children: [ + '/docs/installation-guide', + '/docs/requirements', + '/docs/access-credentials', + '/docs/webhook-secrets', + '/docs/deployment', + '/docs/configuring-webhooks', + '/docs/provider-credentials', + ] + }, + { + text: 'Configuring Atlantis', + collapsible: true, + children: [ + { + text: 'Overview', + link: '/docs/configuring-atlantis', + }, + '/docs/server-configuration', + '/docs/server-side-repo-config', + '/docs/pre-workflow-hooks', + '/docs/post-workflow-hooks', + '/docs/policy-checking', + '/docs/custom-workflows', + '/docs/repo-level-atlantis-yaml', + '/docs/upgrading-atlantis-yaml', + '/docs/command-requirements', + '/docs/checkout-strategy', + '/docs/terraform-versions', + '/docs/terraform-cloud', + '/docs/using-slack-hooks', + '/docs/stats', + '/docs/faq', + ] + }, + { + text: 'Using Atlantis', + collapsible: true, + children: [ + { + text: 'Overview', + link: '/docs/using-atlantis', + }, + '/docs/api-endpoints', + ] + }, + { + text: 'How Atlantis Works', + collapsible: true, + children: [ + { + text: 'Overview', + link: '/docs/how-atlantis-works', + }, + '/docs/locking', + '/docs/autoplanning', + '/docs/automerging', + '/docs/security', + ] + }, + { + text: 'Real-time Terraform Logs', + collapsible: true, + children: [ + '/docs/streaming-logs', + ] + }, + { + text: 'Troubleshooting', + collapsible: true, + children: [ + '/docs/troubleshooting-https', + ] + } + ] +}; + +export default { en }; From 43c943748b85873688613d61a7a0b341312050c1 Mon Sep 17 00:00:00 2001 From: Subin Choi Date: Thu, 9 May 2024 13:05:28 +0900 Subject: [PATCH 2/4] docs: typo in server-configuration.md (#4524) --- runatlantis.io/docs/server-configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runatlantis.io/docs/server-configuration.md b/runatlantis.io/docs/server-configuration.md index 87892c3dd2..5adc1fc8ac 100644 --- a/runatlantis.io/docs/server-configuration.md +++ b/runatlantis.io/docs/server-configuration.md @@ -385,7 +385,7 @@ and set `--autoplan-modules` to `false`. ```bash atlantis server --disable-markdown-folding # or - ATLANTIS_DISABLE_MARKDOWN_FOLDER=true + ATLANTIS_DISABLE_MARKDOWN_FOLDING=true ``` Disable folding in markdown output using the `
` html tag. From c4a2a2c760f0d7b9e76241f9b9b31c36024079ae Mon Sep 17 00:00:00 2001 From: Neil <64523806+neilscallywag@users.noreply.github.com> Date: Thu, 9 May 2024 22:52:32 +0800 Subject: [PATCH 3/4] fix(slack-hooks): updated example for atlantis configuration (#4525) --- runatlantis.io/docs/using-slack-hooks.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runatlantis.io/docs/using-slack-hooks.md b/runatlantis.io/docs/using-slack-hooks.md index 78955a5100..8b32b1b92b 100644 --- a/runatlantis.io/docs/using-slack-hooks.md +++ b/runatlantis.io/docs/using-slack-hooks.md @@ -43,7 +43,7 @@ webhooks: workspace-regex: .* branch-regex: .* kind: slack - channel: my-channel + channel: my-channel-id ``` If you are deploying Atlantis as a Helm chart, this can be implemented via the `config` parameter available for [chart customizations](https://github.com/runatlantis/helm-charts#customization): @@ -59,9 +59,9 @@ config: | workspace-regex: .* branch-regex: .* kind: slack - channel: my-channel + channel: my-channel-id ``` -The `apply` event information will be sent to the `my-channel` Slack channel. +The `apply` event information will be sent to the `my-channel-id` Slack channel. From 1475ee60f9e1c67f47c92c09c204120f058248fd Mon Sep 17 00:00:00 2001 From: nitrocode <7775707+nitrocode@users.noreply.github.com> Date: Thu, 9 May 2024 15:50:28 -0500 Subject: [PATCH 4/4] feat: add pr size labeler (#4526) --- .github/workflows/pr-size-labeler.yml | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/pr-size-labeler.yml diff --git a/.github/workflows/pr-size-labeler.yml b/.github/workflows/pr-size-labeler.yml new file mode 100644 index 0000000000..95d01ab8c4 --- /dev/null +++ b/.github/workflows/pr-size-labeler.yml @@ -0,0 +1,28 @@ +name: pr-size + +on: [pull_request] + +jobs: + labeler: + runs-on: ubuntu-latest + name: Label the PR size + steps: + - uses: codelytv/pr-size-labeler@v1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + xs_label: 'size/xs' + xs_max_size: '10' + s_label: 'size/s' + s_max_size: '100' + m_label: 'size/m' + m_max_size: '500' + l_label: 'size/l' + l_max_size: '1000' + xl_label: 'size/xl' + # fail_if_xl: 'false' + # message_if_xl: > + # This PR exceeds the recommended size of 1000 lines. + # Please make sure you are NOT addressing multiple issues with one PR. + # Note this PR might be rejected due to its size. + github_api_url: 'https://api.github.com' + files_to_ignore: ''