Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MagicLink doesn't link user/.github#num correctly #2562

Closed
woodruffw opened this issue Jan 10, 2025 · 3 comments · Fixed by #2563
Closed

MagicLink doesn't link user/.github#num correctly #2562

woodruffw opened this issue Jan 10, 2025 · 3 comments · Fixed by #2563
Labels
S: confirmed Confirmed bug report or approved feature request. T: bug Bug.

Comments

@woodruffw
Copy link

Description

Hi there, thanks for this extension set! I'm a very happy user.

I noticed what I think is a MagicLink bug in zizmor's documentation, appearing with woodruffw/zizmor#415: it looks like user/.github#num doesn't appear to recognize user/.github as the user/repo slug, and instead sees it as {default_user}/github#num.

For example, nextcloud/.github#477 is included here and gets linked incorrectly to https://github.com/woodruffw/github/issues/477, instead of https://github.com/nextcloud/.github/issues/477.

Some additional details here: woodruffw/zizmor#415

Minimal Reproduction

  1. Use user/.github#num as a MagicLink
  2. Observe that the link is to {default_user}/github#num instead of user/.github#num

Version(s) & System Info

  • Operating System: Ubuntu 24.04
  • Python Version: 3.12
  • Package Version: 10.14 (via mkdocs-material)
@woodruffw woodruffw added the T: bug Bug. label Jan 10, 2025
@gir-bot gir-bot added the S: triage Issue needs triage. label Jan 10, 2025
@facelessuser facelessuser added S: confirmed Confirmed bug report or approved feature request. and removed S: triage Issue needs triage. labels Jan 10, 2025
@facelessuser
Copy link
Owner

Yes, this is a bug. We were including an unnecessary check that the repo has a word boundary at the start, but since repos can start with ., this caused the . to be invalid when at the start of the repo name. This could cause the user name part, along with the . to be discarded and treated like a repo internal to the default user.

Anyway, the fix is pretty easy and I should have one up sometime soon.

@woodruffw
Copy link
Author

Awesome, thanks for confirming! Please let me know if there's anything else I can do.

@facelessuser
Copy link
Owner

facelessuser commented Jan 10, 2025

Above linked PR provides the fix for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: confirmed Confirmed bug report or approved feature request. T: bug Bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants