Skip to content

fix(check-links): count an asset in the checkout as present on main - #36

Merged
kanywst merged 1 commit into
mainfrom
fix/check-links-local-assets
Dec 3, 2026
Merged

kanywst merged 1 commit into
mainfrom
fix/check-links-local-assets

Conversation

@kanywst

@kanywst kanywst commented Dec 3, 2026

Copy link
Copy Markdown
Member

A new article's cover_image is an absolute raw URL on main, and the cover is pushed with the article. In a pull request that URL is still 404, so validate fails until the PR is merged (#35 hit this).

check_links.py now treats a raw.githubusercontent.com/0-draft/dev.to/{refs/heads/,}main/<path> URL as present when <path> is a file in the checkout, and probes everything else as before. A raw URL on another branch or repo, or one whose file is not in the checkout, is still probed.

Checked: local_asset returns the path for an existing cover (with and without ?v=), and None for a missing file, another branch, and another repo. check_links.py articles/introducing-dyokto.md with the #35 files in the tree: 0 broken, exit 0.

@coderabbitai

coderabbitai Bot commented Dec 3, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1104d7aa-8a73-415d-8b7b-ad5a36850216
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@claude

claude Bot commented Dec 3, 2026

Copy link
Copy Markdown

No findings. The change is limited to the local-asset check in scripts/check_links.py. It only does a read-only os.path.isfile lookup, and nothing from a URL reaches a shell. The REPO and os references it uses are defined in the file.

@kanywst
kanywst merged commit d6b3f99 into main Dec 3, 2026
3 checks passed
@kanywst
kanywst deleted the fix/check-links-local-assets branch December 3, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant