Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 1 addition & 42 deletions .github/workflows/check-markdown-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,4 @@ on:

jobs:
check-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: gaurav-nelson/github-action-markdown-link-check@3c3b66f1f7d0900e37b71eca45b63ea9eedfce31 # v1.0.17
id: link-check
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: '.markdown-link-check.json'
continue-on-error: true

- name: Create issue if links are broken
if: steps.link-check.outcome == 'failure'
uses: actions/github-script@v7
with:
script: |
const title = '🔗 Broken markdown links detected';
const label = 'broken-links';

// Check for existing open issue to avoid duplicates
const existing = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
labels: label,
});

if (existing.data.length > 0) {
console.log(`Issue already exists: #${existing.data[0].number}`);
return;
}

const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;

await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title,
body: `The weekly markdown link check found broken links.\n\nSee the [workflow run](${runUrl}) for details.`,
labels: [label],
});
uses: strands-agents/devtools/.github/workflows/check-markdown-links.yml@main
6 changes: 0 additions & 6 deletions .markdown-link-check.json

This file was deleted.