Skip to content

Commit 980b6f2

Browse files
authored
Merge pull request #65 from sommersoft/rtd_fetch_fix
Fix 'ERROR_RTD_VALID_VERSIONS_FAILED'
2 parents 1647a9a + ddc1e67 commit 980b6f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adabot/circuitpython_libraries.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ def validate_readthedocs(repo):
709709
errors.append(ERROR_RTD_ADABOT_MISSING)
710710

711711
valid_versions = requests.get(
712-
"https://readthedocs.org/api/v2/project/{}/valid_versions/".format(subproject["id"]),
712+
"https://readthedocs.org/api/v2/project/{}/active_versions/".format(subproject["id"]),
713713
timeout=15)
714714
if not valid_versions.ok:
715715
errors.append(ERROR_RTD_VALID_VERSIONS_FAILED)
@@ -719,7 +719,7 @@ def validate_readthedocs(repo):
719719
if not latest_release.ok:
720720
errors.append(ERROR_GITHUB_RELEASE_FAILED)
721721
else:
722-
if latest_release.json()["tag_name"] not in valid_versions["flat"]:
722+
if latest_release.json()["tag_name"] not in [tag["verbose_name"] for tag in valid_versions["versions"]]:
723723
errors.append(ERROR_RTD_MISSING_LATEST_RELEASE)
724724

725725
# There is no API which gives access to a list of builds for a project so we parse the html

0 commit comments

Comments
 (0)