Skip to content

ci(docs): skip t.me links in the external URL checker - #2064

Merged
kovtcharov-amd merged 1 commit into
mainfrom
fix/doc-links-allowlist-tme
Jul 13, 2026
Merged

kovtcharov-amd merged 1 commit into
mainfrom
fix/doc-links-allowlist-tme

Conversation

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

The external-URL doc check fails on every PR with a DNS error on https://t.me/BotFather (in docs/guides/telegram-adapter.mdx). The link is valid — it's Telegram's canonical BotFather deep-link — but t.me is unresolvable from GitHub Actions runners, so a correct URL turns the check red for unrelated PRs (surfaced on #2057/#2058). This skips the t.me host the same way other CI-unreachable-but-valid domains already are, so the checker stops flagging a good link.

The pattern is anchored to scheme+host (^https?://t\.me/) rather than a bare t.me substring, so lookalike hosts that merely contain the substring (e.g. content.medium.com) are not falsely skipped.

Note: this is only the CI-noise fix. The real follow-up — that the Telegram adapter has no end-to-end/live test proving it works — is tracked in #2062.

Test plan

  • should_skip("https://t.me/BotFather") / http://t.me/somebot → True.
  • should_skip("https://content.medium.com/foo") and https://example.org/t.me/x → False (no false-positive from the substring).
  • Verify external URLs check passes on this PR.

Telegram deep-links (e.g. https://t.me/BotFather in the telegram adapter
guide) are valid but unresolvable from GitHub Actions runners, so the
external-URL check fails with a DNS error on every PR. Skip the t.me host
the same way other CI-unreachable-but-valid domains are handled.

Anchored to the scheme+host (^https?://t\.me/) so lookalike hosts that merely
contain the substring t.me (e.g. content.medium.com) are not falsely skipped.
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve ✅

This adds a one-line skip pattern so the doc-link checker stops flagging Telegram's t.me/BotFather deep-link — a valid URL that simply doesn't resolve from GitHub Actions runners. It's a targeted CI-noise fix, consistent with how other CI-unreachable-but-valid hosts are already handled. No functional or user-facing behavior changes.

The one thing worth confirming: the pattern is anchored to scheme+host (^https?://t\.me/), which correctly avoids false-skips on lookalike hosts. I verified all four cases from the test plan behave as claimed.

🔍 Technical details

Verified behavior — ran the regex directly against the PR's test-plan cases:

URL should_skip
https://t.me/BotFather True ✅
http://t.me/somebot True ✅
https://content.medium.com/foo False ✅
https://example.org/t.me/x False ✅

The last two matter because content.medium.com actually contains the substring t.me (...conten**t.me**dium...) — a bare t.me skip would have false-matched it. The ^-anchor (checked via re.search in check_doc_links.py:141) prevents that, so the reasoning in the description holds.

Strengths

  • Correctly anchored to scheme+host rather than a bare substring — the subtle failure mode is anticipated and avoided.
  • Scope-clean: single line, sits naturally alongside the existing RFC1918 / same-repo skip patterns, with a comment stating why it's skipped (CI-unresolvable, not invalid).
  • Honest scoping — the description explicitly flags that this only fixes CI noise and that the missing Telegram-adapter live test is tracked separately (test(messaging): Telegram adapter has no end-to-end coverage — 'does it actually work' is unverified #2062), rather than pretending it validates the link.

Note (non-blocking): util/check_doc_links.py has no unit test, so these should_skip assertions aren't captured in the suite. Not worth blocking a one-line data addition to an existing CI helper, but a small test_check_doc_links.py covering the skip patterns would lock in the anchor behavior against future edits.

@kovtcharov-amd
kovtcharov-amd merged commit 7a61a14 into main Jul 13, 2026
27 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the fix/doc-links-allowlist-tme branch July 13, 2026 23:11
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