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

Add more urls to github + don't use raw api #31

Merged
merged 4 commits into from
Feb 12, 2025
Merged

Conversation

jakekaplan
Copy link
Collaborator

CLOSES ENG-1337

  • Lets us accept more kinds of urls from github as long as we can get all the information we need
  • Stops using the https://raw.githubusercontent.com/ because those seem like they can be cached indefinitely

Copy link

linear bot commented Feb 11, 2025

ENG-1337 `raw.githubusercontent.com` doesn't update fast

we should maybe us the github api for this instead of the raw url.

Comment on lines +27 to +35
Handles various GitHub URL formats:
- https://github.com/owner/repo/blob/branch/path/to/file.py
- https://github.com/owner/repo/tree/branch/path/to/file.py
- github.com/owner/repo/blob/a1b2c3d/path/to/file.py (commit SHA)
- github.com/owner/repo/blob/path/to/file.py (uses first path component as ref)

Also handles tree URLs:
- https://github.com/owner/repo/tree/branch/path/to/dir
- github.com/owner/repo/tree/a1b2c3d/path/to/dir (commit SHA)
- github.com/owner/repo/tree/path/to/dir (uses first path component as ref)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd love to surface this up to the --help of the deploy command

@jakekaplan jakekaplan merged commit edf42e3 into main Feb 12, 2025
4 checks passed
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.

2 participants