Commit 869c031
authored
π [Docs]: Name GitHub Action helper modules after the action (#25)
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.1 parent 3e196a6 commit 869c031
2 files changed
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
517 | 538 | | |
518 | 539 | | |
519 | 540 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
0 commit comments