Skip to content

Conversation

@all4code
Copy link
Collaborator

Description of the Change

Cleanup workload init / remove local feature branches to allow re-use of workload names.

@all4code all4code requested a review from mturetskii January 30, 2024 11:27
mturetskii
mturetskii previously approved these changes Jan 30, 2024
self._repo.heads[branch_name].checkout()

@trace()
def delete_branch(self, branch_name: str):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we do it something like this?

@trace()
 def delete_branch(self, branch_name: str):
        try:
            ref = self._repo.heads[branch_name]
        except KeyError:
            logger.warning(f"Branch '{branch_name}' does not exist.")
            return
        self._repo.delete_head(ref, force=True)
        logger.debug(f"Branch '{branch_name}' successfully deleted.")

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agree, I will introduce the change suggested here.

@all4code all4code requested a review from mturetskii February 1, 2024 16:50
@all4code all4code merged commit ac4d737 into main Feb 2, 2024
@all4code all4code deleted the feature/remove-local-wl-branch branch February 2, 2024 17:12
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.

3 participants