Skip to content

Roundup handles Git operations differently between Maven and Python repositories #92

@nutjob4life

Description

@nutjob4life

🐛 Describe the bug

While implementing #90, I discovered that the git operations performed by the Roundup Action in Maven and Python repositories have drifted apart.

For example, the "version bump" step for Python does

git push origin HEAD:main --force

while the Maven "version bump" step does

git push origin HEAD:main

The "GitHub release" step similarly differs in its handling, as does the "repo cleanup" step.

The Roundup Action uses the abstract factory design pattern to create Step objects appropriate to the Roundup. But it should also use the template method design pattern so that the git steps are identical between repository instances. For example, it could look like this (demonstrating two of the steps):

classDiagram
Step <|-- VersionBumpingStep
Step <|-- GitHubReleaseStep
GitHubReleaseStep <|-- PythonGitHubReleaseStep
GitHubReleaseStep <|-- MavenGitHubReleaseStep
VersionBumpingStep <|-- PythonVersionBumpingStep
VersionBumpingStep <|-- MavenVersionBumpingStep
Step: +execute()
VersionBumpingStep: +execute()
GitHubReleaseStep: +execute()
VersionBumpingStep: #write_version_files
MavenVersionBumpingStep: #write_version_iles
PythonVersionBumpingStep: #write_version_files
GitHubReleaseStep: #get_snapshot_tag_pattern
PythonGitHubReleaseStep: #get_snapshot_tag_pattern
MavenGitHubReleaseStep: #get_snapshot_tag_pattern
GitHubReleaseStep: #execute_pds_github_util
PythonGitHubReleaseStep: #execute_pds_github_util
MavenGitHubReleaseStep: #execute_pds_github_util
Loading

🕵️ Expected behavior

git operations should identical between Maven and Python repositories.

📚 Version of Software Used

Current stable.

🩺 Test Data / Additional context


🦄 Related requirements

⚙️ Engineering Details

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

ToDo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions