Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an initial resync_versions API to v3 #11484

Merged
merged 13 commits into from
Jul 29, 2024
Merged

Add an initial resync_versions API to v3 #11484

merged 13 commits into from
Jul 29, 2024

Conversation

ericholscher
Copy link
Member

@ericholscher ericholscher commented Jul 18, 2024

This will be used in the frontend,
but also available as an API.

Mostly curious if this is a good approach,
and I can get some tests together for it.

Looks like:

-> curl -X POST http://devthedocs.com/api/v3/projects/read-the-docs/sync_versions/ -H "Authorization: Token $TOKEN" 
{"triggered":true}

Refs #6090

This will be used in the frontend,
but also available as an API.

Mostly curious if this is a good approach,
and I can get some tests together for it.

Refs #6090
@ericholscher ericholscher requested a review from a team as a code owner July 18, 2024 20:42
@ericholscher ericholscher requested a review from stsewd July 18, 2024 20:42
@ericholscher ericholscher linked an issue Jul 18, 2024 that may be closed by this pull request
Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this PR is fine. However, I'm proposing to use PATCH method over a URL we already have. This will simplify the PR and keep our endpoints semantically consistent across them.

readthedocs/api/v3/urls.py Outdated Show resolved Hide resolved
readthedocs/api/v3/serializers.py Show resolved Hide resolved
readthedocs/api/v3/views.py Outdated Show resolved Hide resolved
@humitos humitos dismissed their stale review July 23, 2024 15:51

Seems the implementation is hard.

@humitos humitos requested a review from stsewd July 23, 2024 15:52
Copy link
Member

@stsewd stsewd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, we should document this new endpoint.

@ericholscher ericholscher requested a review from a team as a code owner July 25, 2024 22:49
@ericholscher ericholscher enabled auto-merge (squash) July 25, 2024 22:50
Comment on lines 468 to 469
:statuscode 204: Updated successfully
:statuscode 204: Task created successfully
:statuscode 400: Bad request, task not created
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be below the next section...

docs/user/api/v3.rst Outdated Show resolved Hide resolved
docs/user/api/v3.rst Outdated Show resolved Hide resolved
Co-authored-by: Santos Gallegos <stsewd@proton.me>
@ericholscher ericholscher merged commit 6528d5d into main Jul 29, 2024
6 of 8 checks passed
@ericholscher ericholscher deleted the resync-versions branch July 29, 2024 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add UI element for resyncing versions from VCS
3 participants