Skip to content

Commit b3af824

Browse files
committed
Update some comments after noticing how Build.identifier/.verbose_name fields are used
1 parent 746d94b commit b3af824

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

readthedocs/api/v2/views/integrations.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@
1515
from rest_framework.status import HTTP_400_BAD_REQUEST
1616
from rest_framework.views import APIView
1717

18-
from readthedocs.builds.constants import (
19-
EXTERNAL_VERSION_STATE_CLOSED,
20-
EXTERNAL_VERSION_STATE_OPEN,
21-
LATEST,
22-
)
18+
from readthedocs.builds.constants import LATEST
2319
from readthedocs.core.signals import webhook_bitbucket, webhook_github, webhook_gitlab
2420
from readthedocs.core.views.hooks import (
2521
build_branches,
@@ -190,7 +186,7 @@ def get_response_push(self, project, branches):
190186
191187
:param project: Project instance
192188
:type project: Project
193-
:param branches: List of branch names to build
189+
:param branches: List of branch/tag names to build
194190
:type branches: list(str)
195191
"""
196192
to_build, not_building = build_branches(project, branches)

readthedocs/builds/tasks.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,10 @@ def sync_versions_task(project_pk, tags_data, branches_data, **kwargs):
292292
Creates new Version objects for tags/branches that aren't tracked in the database,
293293
and deletes Version objects for tags/branches that don't exists in the repository.
294294
295-
:param tags_data: List of dictionaries with ``verbose_name`` and ``identifier``.
296-
:param branches_data: Same as ``tags_data`` but for branches.
295+
:param tags_data: List of dictionaries with ``verbose_name`` and ``identifier``
296+
Example: ("v1.0.0", "67a9035990f44cb33091026d7453d51606350519").
297+
:param branches_data: Same as ``tags_data`` but for branches (branch name, branch identifier).
298+
Example: ("latest", "main")
297299
:returns: `True` or `False` if the task succeeded.
298300
"""
299301
project = Project.objects.get(pk=project_pk)

0 commit comments

Comments
 (0)