Skip to content

Commit 5759379

Browse files
authored
Merge pull request #6877 from readthedocs/configurable-status-name
Make the status name in CI configurable via setting
2 parents ad72dc6 + c4e830f commit 5759379

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

readthedocs/builds/constants.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@
100100
},
101101
}
102102

103-
RTD_BUILD_STATUS_API_NAME = 'continuous-documentation/read-the-docs'
104-
105103
GITHUB_EXTERNAL_VERSION_NAME = 'Pull Request'
106104
GITLAB_EXTERNAL_VERSION_NAME = 'Merge Request'
107105
GENERIC_EXTERNAL_VERSION_NAME = 'External Version'

readthedocs/oauth/services/github.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from readthedocs.builds.constants import (
1616
BUILD_STATUS_SUCCESS,
1717
SELECT_BUILD_STATUS,
18-
RTD_BUILD_STATUS_API_NAME
1918
)
2019
from readthedocs.integrations.models import Integration
2120

@@ -438,7 +437,7 @@ def send_build_status(self, build, commit, state):
438437
'state': github_build_state,
439438
'target_url': target_url,
440439
'description': description,
441-
'context': RTD_BUILD_STATUS_API_NAME
440+
'context': settings.RTD_BUILD_STATUS_API_NAME
442441
}
443442

444443
resp = None

readthedocs/oauth/services/gitlab.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
from readthedocs.builds.constants import (
1313
BUILD_STATUS_SUCCESS,
14-
RTD_BUILD_STATUS_API_NAME,
1514
SELECT_BUILD_STATUS,
1615
)
1716
from readthedocs.builds import utils as build_utils
@@ -524,7 +523,7 @@ def send_build_status(self, build, commit, state):
524523
'state': gitlab_build_state,
525524
'target_url': target_url,
526525
'description': description,
527-
'context': RTD_BUILD_STATUS_API_NAME
526+
'context': settings.RTD_BUILD_STATUS_API_NAME
528527
}
529528
url = self.adapter.provider_base_url
530529

readthedocs/settings/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ class CommunityBaseSettings(Settings):
9999
RTD_STABLE_VERBOSE_NAME = 'stable'
100100
RTD_CLEAN_AFTER_BUILD = False
101101
RTD_MAX_CONCURRENT_BUILDS = 4
102+
RTD_BUILD_STATUS_API_NAME = 'docs/readthedocs'
102103

103104
# Database and API hitting settings
104105
DONT_HIT_API = False

0 commit comments

Comments
 (0)