-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Automation rules: add delete version action #7644
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
Conversation
Currently we automatically delete inactive versions when they are deleted from the repository. If the version is active we keep it, and users must deactivate it manually. With this rule users can automate that. Default versions can't deactivate it, users must change the default version first. This is the only rule that is run when a version is deleted. Closes #7637
8aa3b58
to
beec626
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a good feature.
I'd like to keep delete_versions_from_db
as it was and add a helper or similar to "get versions deleted from remote repository that we still have in the DB" because I found it super confusing to be added in the same function that effectively delete versions from the DB.
Besides that, I left some other small comments to consider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I added project's slug in the log as well; otherwise, we will see just latest
or similar version's slug that are repeated across many projects.
Co-authored-by: Manuel Kaufmann <[email protected]>
…thedocs.org into automation-rules-delete
Currently we automatically delete inactive versions
when they are deleted from the repository.
If the version is active we keep it,
and users must deactivate it manually.
With this rule users can automate that.
Default versions can't deactivate it,
users must change the default version first.
This is the only rule that is run when a version is deleted.
Closes #7637