FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

ci(links): avoid duplicate broken link reports by bearomorphism · Pull Request #2073 · commitizen-tools/commitizen · GitHub

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .yml  (1) All 1 file type selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
21 changes: 18 additions & 3 deletions .github/workflows/links.yml
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
Expand Up @@ -28,14 +28,29 @@ jobs:
with:
script: |
const fs = require('fs');
const reportTitle = 'Broken Links Report';
const openIssues = await github.paginate(
github.rest.issues.listForRepo,
{
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
per_page: 100
}
);

if (openIssues.some(issue =>
!issue.pull_request && issue.title === reportTitle
)) {
core.info(`An open "${reportTitle}" issue already exists; skipping.`);
return;
}

// Read the markdown file
// Ensure the path is correct relative to the workspace root
const reportBody = fs.readFileSync('./lychee/out.md', 'utf8');

await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: 'Broken Links Report',
title: reportTitle,
body: reportBody
});
Loading

Back | FazBrowse Home | New Git URL