Skip to content

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

Merged
merged 6 commits into from
Nov 11, 2020
Merged

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented Nov 5, 2020

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

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
@stsewd stsewd force-pushed the automation-rules-delete branch from 8aa3b58 to beec626 Compare November 5, 2020 19:27
@stsewd stsewd requested a review from a team November 5, 2020 19:53
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.

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.

@stsewd stsewd requested a review from humitos November 11, 2020 15:50
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 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.

@stsewd stsewd merged commit 555194f into master Nov 11, 2020
@stsewd stsewd deleted the automation-rules-delete branch November 11, 2020 16:37
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.

Automation rules for when a branch/tag is deleted
2 participants