Skip to content

Webhooks: refactor branch/tag building#12014

Merged
stsewd merged 10 commits into
mainfrom
refactor-branch-building
Mar 25, 2025
Merged

Webhooks: refactor branch/tag building#12014
stsewd merged 10 commits into
mainfrom
refactor-branch-building

Conversation

@stsewd

@stsewd stsewd commented Feb 20, 2025

Copy link
Copy Markdown
Member
  • Webhooks can trigger builds to tags, not just branches
  • Since webhooks already know the type of the version, we use it to filter by results.
  • verbose_name is the value we use to match branches or tags.

Extracted from #11942

@stsewd
stsewd requested a review from a team as a code owner February 20, 2025 18:57
@stsewd
stsewd requested a review from humitos February 20, 2025 18:57

@humitos humitos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I left some questions since I have some doubts, but I think it's getting close.

Comment thread readthedocs/vcs_support/backends/git.py
Comment thread readthedocs/core/views/hooks.py Outdated
Comment thread readthedocs/core/views/hooks.py Outdated
Comment thread readthedocs/core/views/hooks.py
Comment thread readthedocs/core/views/hooks.py Outdated
Comment thread readthedocs/projects/models.py
Comment thread readthedocs/projects/models.py
Comment thread readthedocs/rtd_tests/tests/test_api.py

@ericholscher ericholscher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks close to me, with just a couple notes. @humitos could also review it again, but I think overall looks good.

Do we plan to build tags directly with this logic? Is there more info on how this changes anything downstream around that?

Comment thread readthedocs/api/v2/views/integrations.py Outdated
Comment thread readthedocs/core/views/hooks.py Outdated
@stsewd

stsewd commented Mar 19, 2025

Copy link
Copy Markdown
Member Author

Do we plan to build tags directly with this logic?

Only tags/branches that come from a repo webhook

Is there more info on how this changes anything downstream around that?

Not sure what downstream refers to here. But all the logic is the same as before, just more exact when selecting the version that corresponds to the branch/tag to build.

@ericholscher ericholscher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me -- would still like to have @humitos give a 👍 to merge tho, since he had some other review comments.

@humitos humitos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me! 💯

@stsewd
stsewd merged commit 551e5e8 into main Mar 25, 2025
@stsewd
stsewd deleted the refactor-branch-building branch March 25, 2025 20:15
@github-project-automation github-project-automation Bot moved this from Needs review to Done in 📍Roadmap Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants