Skip to content

feat(cli): Support GitHub URLs in dotagents add#28

Merged
gricha merged 3 commits intomainfrom
feat/github-url-support
Feb 19, 2026
Merged

feat(cli): Support GitHub URLs in dotagents add#28
gricha merged 3 commits intomainfrom
feat/github-url-support

Conversation

@gricha
Copy link
Member

@gricha gricha commented Feb 19, 2026

Detect GitHub HTTPS and SSH URLs in parseSource() and normalize them to the canonical owner/repo form before storing in agents.toml. Users naturally copy-paste URLs from GitHub, so dotagents add https://github.com/getsentry/skills now works the same as dotagents add getsentry/skills.

Handles all common URL shapes:

  • https://github.com/owner/repo
  • https://github.com/owner/repo.git
  • https://github.com/owner/repo/
  • https://github.com/owner/repo@ref
  • git@github.com:owner/repo.git
  • git@github.com:owner/repo@ref

The normalization happens early in runAdd() so the canonical form is used for trust validation, duplicate detection, and config storage — keeping agents.toml clean and org-based trust matching working correctly.

Also updates the Zod schema validation to accept GitHub URLs, so manually written URLs in agents.toml pass validation too.

Agent transcript: https://claudescope.sentry.dev/share/DOl4AVfU2YZRkxmHVmdOFkBhYY0hiowjS4LNzyfnNJ8

Detect GitHub HTTPS and SSH URLs in parseSource() and normalize them
to the canonical owner/repo form before storing in agents.toml. This
lets users copy-paste URLs directly from GitHub while preserving clean
config entries and org-based trust matching.

Co-Authored-By: Claude <noreply@anthropic.com>

Agent transcript: https://claudescope.sentry.dev/share/VIvWvKJtCQ_DLllkcOBi74i9pRLy-XW32ZnL-6Das2k
@vercel
Copy link

vercel bot commented Feb 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dotagents Ready Ready Preview, Comment Feb 19, 2026 10:50pm

Request Review

@gricha gricha marked this pull request as ready for review February 19, 2026 22:30
The regex capture group for repo names excluded dots, breaking repos
like vercel/next.js or chartjs/Chart.js. Change [^/@.]+? to [^/@]+?
so dots are allowed while .git suffix stripping still works correctly
via lazy quantifier backtracking.

Co-Authored-By: Claude <noreply@anthropic.com>

Agent transcript: https://claudescope.sentry.dev/share/9b9hpxA3PP8mW1IVsJtDdfYvRVyZqG2BFqdS8VFbHZY
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Export GITHUB_HTTPS_URL and GITHUB_SSH_URL from schema.ts and import
in resolver.ts to eliminate duplication. Tighten owner/repo capture
groups to require an alphanumeric first character, matching the
existing owner/repo validation and preventing dash-prefixed segments
from bypassing safety checks.

Co-Authored-By: Claude <noreply@anthropic.com>
@gricha gricha merged commit e563962 into main Feb 19, 2026
16 checks passed
@gricha gricha deleted the feat/github-url-support branch February 19, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments