Delete Source Control Branch When Merged To Main

Hello, I'm wondering if it's possible to automatically delete a branch in Retool when that branch has been merged to main in GitHub? Or make this a feature someone can opt into.

Or at least to make it more clear that the changes have been merged to main and are live on the app.
Thanks!

Hey @eslinz, we have an automatic branch cleanup feature which deletes old branches if they're deleted in the remote and have no uncommitted work in Retool.

It should be enabled by default in Settings > Beta (search for "Auto-cleanup Source Control Branches"). If this isn't working please reach out to Retool Support or respond here.

Thank you @sriram I will reach out to my Retool Admin to change this setting

Hi @sriram I reached out to someone about this but this setting is on and the branches remain in Retool. Please advise, thanks!

@sriram I am facing similar issue, I would like the deleted branches in Gitlab to be deleted from Retool as well. Is this open bug.

Hey @vhasabe - There are no open bugs with this feature currently. Could you please ensure that the "Automatic branch cleanup" setting is enabled in "Settings" > "Source Control" > "Edit Settings"?

In addition, there are a couple of requirements that need to be met for the branch to be automatically deleted from Retool:

Retool automatically deletes branches after changes are merged if the remote branch no longer exists and there are no uncommitted changes. It can take up to one hour for branches to be automatically deleted.

1 Like