Skip to content

Commit aa0d124

Browse files
🩹 [Patch]: New module repositories ship the required community and governance files (#37)
Repositories created from this template now ship the community and governance files that the PSModule [Repository Defaults](https://psmodule.github.io/docs/Modules/Repository-Defaults/) standard requires, so a new module repository is compliant on its first commit instead of starting with a manual cleanup task. The template previously relied on the organization `.github` fallback, which is only surfaced in GitHub's web UI — agents, linters, and local tooling never see it. ## New: Security policy `SECURITY.md` states that only the latest released version is supported and routes vulnerability reports to a private security advisory, with `psmodule@psmodule.io` as the fallback. It is deliberately worded so a reporter never opens a public issue for a vulnerability. ## New: Support routing `SUPPORT.md` tells users where to go: repository issues for the module, `psmodule@psmodule.io` for anything that does not belong in public, and the PowerShell Gallery maintainers for Gallery problems. It points at `SECURITY.md` for vulnerabilities and `CONTRIBUTING.md` for people who want to fix it themselves. ## New: Code of conduct `CODE_OF_CONDUCT.md` is Contributor Covenant 2.1, matching the organization-level file, with `psmodule@psmodule.io` filled in as the enforcement contact instead of the `[INSERT CONTACT METHOD]` placeholder the org copy still carries. ## New: Pull request template `.github/pull_request_template.md` prompts for the PR Manager format from [PR Format](https://msxorg.github.io/docs/Ways-of-Working/PR-Format/): the title pattern with its icon and change type, a user-facing summary, the `New`/`Changed`/`Fixed`/`Breaking Changes` sections, a technical section for reviewers, and a collapsible related-issues block. All guidance is in HTML comments so it disappears from the rendered description and never leaks into generated release notes. ## Changed: Setup instructions name a placeholder that exists The README told new module authors to replace `{{ NAME }}` and `{{ DESCRIPTION }}`, but the template only ships `{{ NAME }}` (in `examples/General.ps1`). The step now names only the placeholder that is actually there. ## Technical Details - `.github/copilot-instructions.md` was added and then removed again during this work. Repository Defaults still lists it as required, but `AGENTS.md` at the repository root is the agent entry point and is read natively by the runtimes, so a Copilot-only pointer file is duplication that drifts. The stale table entry is tracked in PSModule/docs#102. - **Custo:** none of these files are distributed by [`MSXOrg/Custo`](https://github.com/MSXOrg/Custo) today. Custo currently contains only a README and a LICENSE, and its bootstrap work is still in draft. Its predecessor, `PSModule/Distributor`, manages `CODEOWNERS`, `LICENSE`, linter settings, `PSModule.yml`, `dependabot.yml`, `.gitattributes`, `.gitignore`, instructions, hooks, and prompts for module repositories — it does not manage any of the files in this pull request. The template is therefore the right home for them right now. When Custo starts distributing community files, these copies become the seed for the managed source and further wording changes belong in Custo, not here. - Rest of the template was checked against the Repository Defaults required-files and layout tables. Everything else required is present, and `@PSModule/module-maintainers` in `CODEOWNERS` resolves to a real team. - Two remaining mismatches are docs problems rather than template problems and are covered by PSModule/docs#102, both confirmed against a 24-repository survey of the organization: - The layout table names `.github/workflows/workflow.yml`, but all 24 surveyed module repositories use `Process-PSModule.yml` and none has a `workflow.yml`. `workflow.yml` is the *called* reusable workflow inside `PSModule/Process-PSModule`, not the caller. - The supply-chain section publishes a fixed configuration block containing `package-ecosystem: "powershell"`, which does not exist in Dependabot — `dependabot-core@dc2e4422d` ships 33 ecosystems and none of them cover PowerShell or the PowerShell Gallery. Adding it breaks the entire Dependabot configuration, including the `github-actions` entry. All 24 surveyed repositories configure `github-actions`, and only `Sodium` adds a second one (`nuget`, for its .NET assembly). The issue asks for the guidance to be restated as a rule — configure `github-actions` plus whichever additional ecosystems apply and are supported by the current version of Dependabot — instead of a copy-paste block that goes stale. <details> <summary>Related issues</summary> - Fixes #36 - PSModule/docs#102 </details> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 479cb76 commit aa0d124

5 files changed

Lines changed: 209 additions & 1 deletion

File tree

.github/pull_request_template.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!-- markdownlint-disable MD041 -->
2+
<!--
3+
This description becomes the release note. Write it for users of the module, not for reviewers.
4+
5+
Title: <Icon> [<Type>]: <User-facing outcome>
6+
🌟 [Major] · 🚀 [Feature] · 🩹 [Patch] · 🪲 [Fix] · 📖 [Docs] · ⚙️ [Maintenance]
7+
8+
Apply the matching label: Major, Minor, Patch, or NoRelease.
9+
Full format: https://msxorg.github.io/docs/Ways-of-Working/PR-Format/
10+
11+
Delete the comments and any unused section before marking the pull request ready.
12+
-->
13+
14+
<!-- One paragraph, present tense, describing what changes for the user. -->
15+
16+
## New: <capability>
17+
18+
<!--
19+
What the user can now do, what they need to do differently, and an example.
20+
Use the section headers that fit the change and delete the rest:
21+
## Breaking Changes - what stopped working or changed incompatibly (Major only)
22+
## New: <capability> - new things the user can do
23+
## Changed: <behavior> - existing behavior that now works differently
24+
## Fixed: <problem> - problems now resolved
25+
-->
26+
27+
## Technical Details
28+
29+
<!-- For reviewers: files touched, design decisions, migration notes. Delete this section if there is nothing noteworthy. -->
30+
31+
<details>
32+
<summary>Related issues</summary>
33+
34+
<!-- Use fully qualified references, for example: Fixes PSModule/Repo#123 -->
35+
36+
</details>

CODE_OF_CONDUCT.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official email address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
[psmodule@psmodule.io](mailto:psmodule@psmodule.io).
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series of
86+
actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or permanent
93+
ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within the
113+
community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.1, available at
119+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120+
121+
Community Impact Guidelines were inspired by
122+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123+
124+
For answers to common questions about this code of conduct, see the FAQ at
125+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126+
[https://www.contributor-covenant.org/translations][translations].
127+
128+
[homepage]: https://www.contributor-covenant.org
129+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130+
[Mozilla CoC]: https://github.com/mozilla/diversity
131+
[FAQ]: https://www.contributor-covenant.org/faq
132+
[translations]: https://www.contributor-covenant.org/translations

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ For step-by-step instructions, see the [template quickstart](https://psmodule.gi
1111

1212
## After creating a repository from this template
1313

14-
1. Replace the `{{ NAME }}` and `{{ DESCRIPTION }}` placeholders throughout the repository.
14+
1. Replace the `{{ NAME }}` placeholder with your module name throughout the repository.
1515
2. Replace the starter function, test, and example with your module's first real command.
1616
3. Set the repository description and custom properties on GitHub.
1717
4. Confirm `.github/PSModule.yml` only overrides defaults when your module needs different behavior.

SECURITY.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Security Policy
2+
3+
## Supported versions
4+
5+
Only the latest released version of this module is supported.
6+
Fixes are shipped as a new release rather than backported to older versions, so upgrade before reporting an issue.
7+
8+
## Reporting a vulnerability
9+
10+
Do not report security issues through public issues, pull requests, or discussions.
11+
A public report puts other users at risk before a fix exists.
12+
13+
Report privately instead:
14+
15+
1. Open the repository's **Security** tab and use **Report a vulnerability** to file a private security advisory.
16+
2. If private reporting is unavailable, send an email to [psmodule@psmodule.io](mailto:psmodule@psmodule.io).
17+
18+
Include what the problem is, which module version is affected, and how to reproduce it.
19+
Reports are handled privately until a fixed version is published.

SUPPORT.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Support
2+
3+
## This module
4+
5+
Use the issues on this repository for bugs, feature requests, and questions about the module.
6+
Search the existing issues first, the answer may already be there.
7+
8+
For anything that does not belong in a public issue, send an email to [psmodule@psmodule.io](mailto:psmodule@psmodule.io).
9+
10+
Do not use issues to report security vulnerabilities. Follow [`SECURITY.md`](SECURITY.md) instead.
11+
12+
## PowerShell Gallery
13+
14+
Problems with the PowerShell Gallery itself, such as package listings, downloads, or accounts, belong with the Gallery maintainers:
15+
16+
- [PowerShell/PowerShellGallery issues](https://github.com/PowerShell/PowerShellGallery/issues)
17+
- [cgadmin@microsoft.com](mailto:cgadmin@microsoft.com)
18+
19+
## Fixing it yourself
20+
21+
Contributions are welcome. Read [`CONTRIBUTING.md`](CONTRIBUTING.md) to get started.

0 commit comments

Comments
 (0)