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

fix(find_dependencies): use any github repo project-url if need be #432

Merged
merged 1 commit into from
Aug 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions edx_repo_tools/find_dependencies/find_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,12 @@ def repo_url_from_tgz(tgz_path: str) -> Optional[str]:


SOURCE_URL_REGEXES = [
# These regexes are tried in order. The first group is the extracted URL.
r"(?i)^Project-URL: Source.*,\s*(.*)$",
r"(?i)^Home-page: (.*)$",
r"(?i)^Project-URL: Home.*,\s*(.*)$",
# If we can't find a URL marked as home, then use any GitHub repo URL.
r"(?i)^Project-URL: [^,]+,\s*(https?://github.com/[^/]+/[^/]+)$",
]

def repo_url_from_metadata(filename, metadata):
Expand Down