From 008051a99c0dbb21463915621d9a8bb1d5398594 Mon Sep 17 00:00:00 2001 From: saadmk11 Date: Wed, 17 Jul 2019 15:11:03 +0600 Subject: [PATCH 1/2] small updates --- docs/guides/feature-flags.rst | 2 +- readthedocs/api/v2/views/footer_views.py | 2 +- readthedocs/builds/constants.py | 20 ++++++++++---------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/guides/feature-flags.rst b/docs/guides/feature-flags.rst index 5c539e8427b..884b16f5b8c 100644 --- a/docs/guides/feature-flags.rst +++ b/docs/guides/feature-flags.rst @@ -30,4 +30,4 @@ e.g. python-reno release notes manager is known to do that ``USE_TESTING_BUILD_IMAGE``: :featureflags:`USE_TESTING_BUILD_IMAGE` -``ENABLE_EXTERNAL_VERSION_BUILD``: :featureflags:`ENABLE_EXTERNAL_VERSION_BUILD` +``EXTERNAL_VERSION_BUILD``: :featureflags:`EXTERNAL_VERSION_BUILD` diff --git a/readthedocs/api/v2/views/footer_views.py b/readthedocs/api/v2/views/footer_views.py index 04fedeadd3f..1036ea961b1 100644 --- a/readthedocs/api/v2/views/footer_views.py +++ b/readthedocs/api/v2/views/footer_views.py @@ -9,7 +9,7 @@ from rest_framework_jsonp.renderers import JSONPRenderer from readthedocs.api.v2.signals import footer_response -from readthedocs.builds.constants import LATEST, TAG, INTERNAL +from readthedocs.builds.constants import LATEST, TAG from readthedocs.builds.models import Version from readthedocs.projects.models import Project from readthedocs.projects.version_handling import ( diff --git a/readthedocs/builds/constants.py b/readthedocs/builds/constants.py index d2a375363b4..262aee18474 100644 --- a/readthedocs/builds/constants.py +++ b/readthedocs/builds/constants.py @@ -62,33 +62,33 @@ STABLE, ) -# GitHub Build Statuses -GITHUB_BUILD_STATE_FAILURE = 'failure' -GITHUB_BUILD_STATE_PENDING = 'pending' -GITHUB_BUILD_STATE_SUCCESS = 'success' - # General Build Statuses BUILD_STATUS_FAILURE = 'failed' BUILD_STATUS_PENDING = 'pending' BUILD_STATUS_SUCCESS = 'success' +# GitHub Build Statuses +GITHUB_BUILD_STATUS_FAILURE = 'failure' +GITHUB_BUILD_STATUS_PENDING = 'pending' +GITHUB_BUILD_STATUS_SUCCESS = 'success' + # Used to select correct Build status and description to be sent to each service API SELECT_BUILD_STATUS = { BUILD_STATUS_FAILURE: { - 'github': GITHUB_BUILD_STATE_FAILURE, + 'github': GITHUB_BUILD_STATUS_FAILURE, 'description': 'The build failed!', }, BUILD_STATUS_PENDING: { - 'github': GITHUB_BUILD_STATE_PENDING, + 'github': GITHUB_BUILD_STATUS_PENDING, 'description': 'The build is pending!', }, BUILD_STATUS_SUCCESS: { - 'github': GITHUB_BUILD_STATE_SUCCESS, + 'github': GITHUB_BUILD_STATUS_SUCCESS, 'description': 'The build succeeded!', }, } +RTD_BUILD_STATUS_API_NAME = 'continuous-documentation/read-the-docs' + GITHUB_EXTERNAL_VERSION_NAME = 'Pull Request' GENERIC_EXTERNAL_VERSION_NAME = 'External Version' - -RTD_BUILD_STATUS_API_NAME = 'continuous-documentation/read-the-docs' From b3128ae2f9a9d1d3f8758e484366ef6f8ea3d602 Mon Sep 17 00:00:00 2001 From: saadmk11 Date: Wed, 17 Jul 2019 15:32:26 +0600 Subject: [PATCH 2/2] external version feature flag fix --- readthedocs/projects/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs/projects/models.py b/readthedocs/projects/models.py index 6e647afe284..07c7224fcc6 100644 --- a/readthedocs/projects/models.py +++ b/readthedocs/projects/models.py @@ -1407,7 +1407,7 @@ def add_features(sender, **kwargs): SHARE_SPHINX_DOCTREE = 'share_sphinx_doctree' DEFAULT_TO_MKDOCS_0_17_3 = 'default_to_mkdocs_0_17_3' CLEAN_AFTER_BUILD = 'clean_after_build' - EXTERNAL_VERSION_BUILD = 'enable_external_version_build' + EXTERNAL_VERSION_BUILD = 'external_version_build' UPDATE_CONDA_STARTUP = 'update_conda_startup' FEATURES = (