File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 17
17
import time
18
18
from importlib .metadata import version
19
19
from pathlib import Path
20
+
20
21
import requests
22
+
21
23
# If extensions (or modules to document with autodoc) are in another directory,
22
24
# add these directories to sys.path here. If the directory is relative to the
23
25
# documentation root, use Path().resolve() to make it absolute, like shown here.
68
70
# |version| and |release|, also used in various other places throughout the
69
71
# built documents.
70
72
73
+
71
74
def _get_latest_release_from_github (org : str , repo_name : str ) -> str :
72
- """Get the highest version release (including prereleases) from GitHub repository."""
75
+ """Get the highest version release (including prereleases) from GitHub
76
+ repository."""
73
77
url = f"https://api.github.com/repos/{ org } /{ repo_name } /releases"
74
78
response = requests .get (url )
75
79
releases = response .json ()
@@ -79,6 +83,7 @@ def _get_latest_release_from_github(org: str, repo_name: str) -> str:
79
83
latest_version_release = valid_releases [0 ]["tag_name" ]
80
84
return latest_version_release
81
85
86
+
82
87
# Get the latest release version from GitHub repository
83
88
org = "diffpy"
84
89
repo_name = "diffpy.utils"
You can’t perform that action at this time.
0 commit comments