Skip to content

Commit 4d86c00

Browse files
committedJan 6, 2024
small cleanup
1 parent 8453d61 commit 4d86c00

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed
 

‎validate_json.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ def getfile(url):
1515
lines = issue_content.split("\n")
1616

1717
def validate_repo(line):
18-
repo = line.split(" ")[-1]
19-
if repo.startswith("https://github"):
20-
repo = repo[19:] # strip off beginning of URL if it exists
21-
repo = repo.strip().strip("/") # normalize path
18+
repo = line.split(" ")[-1].lower() # handle both cases of just URL or with Repo URL: before
19+
repo = repo.replace("https://github.com/","").strip().strip("/") # just get the user/project portion
2220
projectUrl = f"https://api.github.com/repos/{repo}"
2321
latestRelease = f"{projectUrl}/releases/latest"
2422
tagsUrl = f"{projectUrl}/tags"

0 commit comments

Comments
 (0)