Skip to content

Rename AutoCleanup to CleanupPrereleases for clearer naming #266

@MariusStorhaug

Description

Context

The AutoCleanup setting in the Publish-PSModule action controls whether prerelease tags are cleaned up after a stable release is created. The name AutoCleanup is vague and does not clearly convey what gets cleaned up.

Request

The setting AutoCleanup should be renamed to CleanupPrereleases across all components to better communicate its purpose. This rename was originally attempted as part of the ReleaseType feature work but was reverted to keep that PR focused.

Current experience

The setting is called AutoCleanup, which could refer to cleaning up anything — branches, artifacts, caches. Only by reading documentation or source code does it become clear that it specifically cleans up prerelease versions.

Desired experience

The setting is called CleanupPrereleases, making its purpose immediately obvious.

Acceptance criteria

  • The setting name CleanupPrereleases is used consistently across all components
  • Backward compatibility is considered (accepting both names during a transition period)
  • Documentation reflects the new name

Technical decisions

Scope: The rename spans three repositories/components:

  • Get-PSModuleSettings: Publish.Module.AutoCleanupPublish.Module.CleanupPrereleases
  • Publish-PSModule: AutoCleanup input → CleanupPrereleases
  • Process-PSModule: Workflow input name update

Breaking change: This is a breaking change for consumers who explicitly set AutoCleanup in their PSModule.yml. A transition period accepting both names should be considered.

Backward compatibility: Accept both AutoCleanup and CleanupPrereleases during a transition period, with a deprecation warning when the old name is used.


Implementation plan

Core changes

  • Update Get-PSModuleSettings to read Publish.Module.CleanupPrereleases (with fallback to AutoCleanup)
  • Update Publish-PSModule action input from AutoCleanup to CleanupPrereleases
  • Update Process-PSModule workflow to use CleanupPrereleases input name
  • Add deprecation warning when AutoCleanup is detected in settings

Documentation

  • Update all references to AutoCleanup in documentation
  • Document the migration path for existing consumers

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions