-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
diffenator2/src/diffenator2/utils.py
Lines 57 to 73 in 7986b84
| def download_latest_github_release( | |
| user: str, | |
| repo: str, | |
| dst: str = None, | |
| github_token: str = None, | |
| ignore_static: bool = True, | |
| ): | |
| headers = {} | |
| if github_token: | |
| headers["Authorization"] = f"Token {github_token}" | |
| latest_release = requests.get( | |
| f"https://api.github.com/repos/{user}/{repo}/releases/latest", | |
| headers=headers, | |
| ).json() | |
| headers["Accept"] = "application/octet-stream" | |
| dl_url = latest_release["assets"][0]["url"] | |
| zip_file = download_file(dl_url, headers=headers) |
(line 72, the [0])
In a project I'm working on, this downloads the wrong release artifact, resulting in an error later on. When using the GitHub Action, there's currently no way to work around this
A couple of suggestions:
- Some kind of filtering support (both in diffenator2 and its GitHub action) or other means of selection
- For the GitHub action, log the name of the file being downloaded so this is easier to debug :)
I don't need an urgent fix, just thought it was worth having on the issue tracker!
Metadata
Metadata
Assignees
Labels
No labels