Compare commits
No commits in common. "b8f0cb387bed1974ff6644ce58919b033146d2ea" and "4c252007b6627e160559efa464bbdfc724534f94" have entirely different histories.
b8f0cb387b
...
4c252007b6
1 changed files with 2 additions and 7 deletions
9
check.py
9
check.py
|
|
@ -7,13 +7,8 @@ import requests
|
|||
|
||||
|
||||
def get_github_version(repository: str) -> str:
|
||||
res = requests.get(f"https://api.github.com/repos/{repository}/releases/latest")
|
||||
|
||||
if res.status_code == 400:
|
||||
res = requests.get(f"https://api.github.com/repos/{repository}/tags")
|
||||
return res.json()[0]
|
||||
|
||||
return res.json()["tag_name"].removeprefix("v")
|
||||
res = requests.get(f"https://api.github.com/repos/{repository}/releases/latest").json()
|
||||
return res["tag_name"].removeprefix("v")
|
||||
|
||||
|
||||
def does_pypi_version_exist(base_url: str, package: str, version: str) -> bool:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue