From 98be732dbda61323d6ed2720ef940555e6251148 Mon Sep 17 00:00:00 2001 From: Ryan Lopopolo Date: Tue, 24 Dec 2024 13:24:37 +0900 Subject: [PATCH] Remove markdown link check This CI job is incredibly flaky and provides little value. Remove it to reduce maintenance burden. --- .github/markdown-link-check.json | 25 ---------------- .github/workflows/markdown-link-check.yaml | 34 ---------------------- CONTRIBUTING.md | 28 +++++++++--------- Rakefile | 19 ------------ 4 files changed, 14 insertions(+), 92 deletions(-) delete mode 100644 .github/markdown-link-check.json delete mode 100644 .github/workflows/markdown-link-check.yaml diff --git a/.github/markdown-link-check.json b/.github/markdown-link-check.json deleted file mode 100644 index 9020721b..00000000 --- a/.github/markdown-link-check.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "ignorePatterns": [ - { - "pattern": "img.shields.io" - }, - { - "pattern": "^https://github.com/artichoke/.*-reserve$" - }, - { - "pattern": "^https://twitter.com/artichokeruby" - } - ], - "replacementPatterns": [], - "httpHeaders": [ - { - "urls": ["https://crates.io"], - "headers": { - "Accept": "text/html" - } - } - ], - "retryOn429": true, - "retryCount": 3, - "fallbackRetryDelay": "60s" -} diff --git a/.github/workflows/markdown-link-check.yaml b/.github/workflows/markdown-link-check.yaml deleted file mode 100644 index e515e228..00000000 --- a/.github/workflows/markdown-link-check.yaml +++ /dev/null @@ -1,34 +0,0 @@ ---- -"on": - push: - branches: - - trunk - paths: - - .github/markdown-link-check.json - - .github/workflows/markdown-link-check.yaml - - "**/*.md" - pull_request: - branches: - - trunk - paths: - - .github/markdown-link-check.json - - .github/workflows/markdown-link-check.yaml - - "**/*.md" - schedule: - - cron: "0 0 * * TUE" -name: Markdown Links Check -jobs: - check-links: - name: Check links - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4.2.2 - - - name: Check for broken links in markdown files - uses: gaurav-nelson/github-action-markdown-link-check@d53a906aa6b22b8979d33bc86170567e619495ec # v1.0.15 - with: - use-quiet-mode: "yes" - use-verbose-mode: "yes" - config-file: ".github/markdown-link-check.json" - folder-path: "." diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 99b41251..e4253020 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -79,20 +79,20 @@ available tasks by running: ```console $ bundle exec rake --tasks -rake bundle:audit:check # Checks the Gemfile.lock for insecure dependencies -rake bundle:audit:update # Updates the bundler-audit vulnerability database -rake fmt # Format sources -rake fmt:terraform # Format Terraform sources with terraform fmt -rake fmt:text # Format text, YAML, and Markdown sources with prettier -rake format # Format sources -rake format:terraform # Format Terraform sources with terraform fmt -rake format:text # Format text, YAML, and Markdown sources with prettier -rake lint # Lint sources -rake lint:rubocop # Run RuboCop -rake lint:rubocop:autocorrect # Auto-correct RuboCop offenses -rake lint:terraform # Lint Terraform sources -rake release:markdown_link_check # Check for broken links in markdown files -rake terraform:providers:lock # Lock terraform providers on all plaforms in all environments +rake bundle:audit:check # Checks the Gemfile.lock for insecure dependencies +rake bundle:audit:update # Updates the bundler-audit vulnerability database +rake fmt # Format sources +rake fmt:terraform # Format Terraform sources with terraform fmt +rake fmt:text # Format text, YAML, and Markdown sources with prettier +rake format # Format sources +rake format:terraform # Format Terraform sources with terraform fmt +rake format:text # Format text, YAML, and Markdown sources with prettier +rake lint # Lint sources +rake lint:rubocop # Run RuboCop +rake lint:rubocop:autocorrect # Autocorrect RuboCop offenses (only when it's safe) +rake lint:rubocop:autocorrect_all # Autocorrect RuboCop offenses (safe and unsafe) +rake lint:terraform # Lint Terraform sources +rake terraform:providers:lock # Lock terraform providers on all plaforms in all environments ``` To lint Ruby sources, project-infrastructure uses [RuboCop]. RuboCop runs as diff --git a/Rakefile b/Rakefile index f605cc63..4cafa166 100644 --- a/Rakefile +++ b/Rakefile @@ -69,22 +69,3 @@ namespace :terraform do end end end - -namespace :release do - link_check_files = FileList.new('**/*.md') do |f| - f.exclude('node_modules/**/*') - f.exclude('**/target/**/*') - f.exclude('**/vendor/**/*') - f.include('*.md') - f.include('**/vendor/*.md') - end - - link_check_files.sort.uniq.each do |markdown| - desc 'Check for broken links in markdown files' - task markdown_link_check: markdown do - command = ['npx', 'markdown-link-check', '--config', '.github/markdown-link-check.json', markdown] - sh command.shelljoin - sleep(rand(1..5)) - end - end -end