Skip to content

📖 [Docs]: Name GitHub Action helper modules after the action#25

Open
Marius Storhaug (MariusStorhaug) wants to merge 1 commit into
mainfrom
docs/action-helper-module-naming
Open

📖 [Docs]: Name GitHub Action helper modules after the action#25
Marius Storhaug (MariusStorhaug) wants to merge 1 commit into
mainfrom
docs/action-helper-module-naming

Conversation

@MariusStorhaug

Copy link
Copy Markdown
Member

Declares the standard from #24: a helper module bundled inside a GitHub Action is named after the action (<action-name>.Helpers), never a generic name like Helpers.

Why

Every module imported during a job shares one session on the runner. A generically named module (Helpers, Utils, Common) collides with a shared module of the same name (an ecosystem often installs a shared helper module that actions import by name) or with another action's helper loaded in the same job. Once two loaded modules share a name, module resolution is ambiguous and unit tests that mock a command inside the module by module name fail. Real example: PSModule/Resolve-PSModuleVersion#4.

Changes

  • Coding-Standards/GitHub-Actions.md — new "Name helper modules after the action" subsection under "Extract non-trivial run: scripts into an action" (rule, rationale, and the shared-module carve-out).
  • Coding-Standards/PowerShell/Scripts.md — cross-reference bullet in Rules.

Validation

markdownlint, textlint terminology, codespell, link check, and index-drift check all pass locally.

Closes #24. Ecosystem rollout across PSModule actions is tracked in PSModule/Process-PSModule#364.

Bundled helper modules named generically (Helpers) collide with shared or sibling modules in the runner's single module session, breaking module resolution and Mock -ModuleName. Require action-scoped names (action-name.Helpers). Declares the standard from issue #24.
@MariusStorhaug Marius Storhaug (MariusStorhaug) added the documentation Improvements or additions to documentation label Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PowerShell standard: name GitHub Action helper modules after the action (e.g. Build-PSModule.Helpers)

1 participant