Duplicated logic for EditMilestoneOption in milestone operations #8
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In
operation/milestone/milestone.go, the logic for populating thegitea_sdk.EditMilestoneOptionstruct is duplicated inEditMilestoneFn(for editing by ID) andEditMilestoneByNameFn(for editing by name).Recommendation:
To improve maintainability and reduce redundancy, this logic should be extracted into a shared helper function.