You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Feature |**Desired capability:** The desired capability from the user's point of view. |
68
+
| Bug / Fix |**What happens:** / **What is expected:** Observed vs. expected behavior.|
69
+
| Change request |**Current experience:** / **Desired experience:** The shift from the user's lens.|
70
+
| Maintenance |**User impact:** How internal work improves reliability, speed, or correctness. |
71
+
| Documentation |**What is confusing or missing:** The gap from a user trying to accomplish a task.|
72
72
73
73
Elements per work type:
74
74
@@ -84,7 +84,88 @@ Elements per work type:
84
84
85
85
✓ = present when applicable, ○ = optional
86
86
87
-
This section **does not contain** file paths, function internals, API endpoints, or implementation patterns. Those belong in Section 2.
87
+
Element definitions:
88
+
89
+
-**Reproduction steps** — a [minimal reproducible example](https://en.wikipedia.org/wiki/Minimal_reproducible_example): exact steps, inputs, and commands that trigger the problem. Anyone can reproduce the failure without guessing.
90
+
-**Environment / version** — module version, PowerShell version (`$PSVersionTable`), and operating system. Other relevant runtime details (host application, execution context) included as applicable. Omitted only when clearly version-independent.
91
+
-**Regression indicator** — whether this previously worked, and in which version. If unknown, stated explicitly.
92
+
-**Known workarounds** — any mitigation available today, even if ugly or incomplete.
93
+
94
+
This section contains:
95
+
96
+
- Context: user story or scenario, background, what the user is trying to accomplish
97
+
- Request: the specific problem, gap, or desired change — as the user experiences it
98
+
- Current vs. desired experience
99
+
- Impact of not addressing this (data loss, confusion, blocked workflows)
100
+
- Acceptance criteria — what "done" looks like from the user's perspective
101
+
- Applicable work-type-specific elements from the table above
102
+
- Links to related issues, PRs, or external references — every external resource is a clickable hyperlink
103
+
104
+
This section **does not contain** file paths, function internals, API endpoints, or implementation patterns. Those belong in Section 2. The section is understandable by someone who has never read the source code.
105
+
106
+
**Example (Bug / Fix):**
107
+
108
+
```markdown
109
+
`Get-GitHubRepository` is used in automation to sync all repositories for an account.
110
+
The script relies on getting the full list so it can detect new or removed repositories.
111
+
112
+
## Request
113
+
114
+
When `Get-GitHubRepository` is called on an account with more than 30 repositories, only 30 results are returned.
115
+
There is no indication that results are incomplete, so it appears as though the full list has been retrieved.
116
+
The silent truncation causes scripts to miss repositories, which can go unnoticed for weeks.
117
+
118
+
### Reproduction steps
119
+
120
+
1. Create or use an account with more than 30 repositories
121
+
2. Run `Get-GitHubRepository`
122
+
3. Count the returned objects — only 30 are returned regardless of total count
123
+
124
+
### What is expected
125
+
126
+
The command should return **all** repositories by default. If there is a way to limit results,
127
+
it should be opt-in — not the default.
128
+
129
+
### Environment
130
+
131
+
-**Module version:** 0.14.0
132
+
-**PowerShell:** 7.4.6 (Linux, Ubuntu 22.04)
133
+
134
+
### Regression
135
+
136
+
This appears to have been the behavior since the initial release. Not a regression.
137
+
138
+
### Workaround
139
+
140
+
Calling the GitHub REST API directly with manual pagination returns all results.
141
+
142
+
### Acceptance criteria
143
+
144
+
- All repositories are returned by default, regardless of how many exist
145
+
- Results can be limited with a parameter when only a subset is needed
146
+
- No silent data loss — if something limits results, it should be explicit
147
+
```
148
+
149
+
**Example (Feature):**
150
+
151
+
```markdown
152
+
Automation scripts that publish module releases to multiple registries currently call `Publish-PSResource`
153
+
in a loop for each target. There is no built-in way to publish to several registries in a single invocation.
154
+
155
+
## Request
156
+
157
+
### Desired capability
158
+
159
+
A `-Repository` parameter on `Publish-Module` that accepts an array of registry names, publishing
160
+
the module to each in sequence. If any single publish fails, the error should be reported per-registry
161
+
without aborting the remaining targets.
162
+
163
+
### Acceptance criteria
164
+
165
+
-`-Repository` accepts one or more registry names
166
+
- Each target is attempted independently — a failure on one does not block the others
167
+
- Output clearly indicates success or failure per registry
168
+
```
88
169
89
170
## Section 2 — Technical Decisions
90
171
@@ -114,6 +195,28 @@ Typical decision areas:
114
195
- Breaking changes and backward compatibility.
115
196
- Test strategy (unit, integration, mocks).
116
197
198
+
**Example:**
199
+
200
+
```markdown
201
+
---
202
+
203
+
## Technical decisions
204
+
205
+
**Function placement:** New private function goes in `src/functions/private/Utilities/` following the existing
206
+
`Invoke-GitHubRestMethod` pattern. Public function stays in `src/functions/public/Repository/`.
207
+
208
+
**Pagination approach:** Use link-header-based pagination (`rel="next"`) rather than page-number incrementing.
209
+
The GitHub REST API uses link headers consistently, and this avoids hardcoding page size assumptions.
210
+
211
+
**Parameter naming:** Use `-First` (consistent with PowerShell convention and `Select-Object -First`) rather than
212
+
`-Limit` or `-MaxResults`.
213
+
214
+
**Breaking changes:** None. Default behavior changes from returning one page to returning all pages, but since the
215
+
previous behavior was undocumented and returning incomplete data, this is treated as a bugfix rather than a breaking change.
216
+
217
+
**Test approach:** Unit tests with mocked API responses. One test per scenario: single-page, multi-page, and `-First` limiting.
218
+
```
219
+
117
220
## Section 3 — Implementation Plan
118
221
119
222
The task-level roadmap. Implementers track progress here; reviewers use it to understand scope.
@@ -128,6 +231,31 @@ Structure:
128
231
129
232
For PBIs and Epics, Section 3 is **a list of links to child issues**, not inline tasks. See [Issue Hierarchy](Issue-Hierarchy.md).
130
233
234
+
**Example:**
235
+
236
+
```markdown
237
+
---
238
+
239
+
## Implementation plan
240
+
241
+
### Core changes
242
+
243
+
-[ ] Add `Invoke-GitHubRestMethodPaged` private function in `src/functions/private/Utilities/`
244
+
-[ ] Update `Get-GitHubRepository` to call paged variant in `src/functions/public/Repository/`
245
+
-[ ] Add `-First` parameter with `[int]` type and validation
246
+
247
+
### Tests
248
+
249
+
-[ ] Add unit test for single-page response
250
+
-[ ] Add unit test for multi-page response
251
+
-[ ] Add unit test for `-First` parameter limiting results
252
+
253
+
### Documentation
254
+
255
+
-[ ] Update function help with new parameter documentation
256
+
-[ ] Add example showing pagination usage
257
+
```
258
+
131
259
## Comments
132
260
133
261
Every description update is accompanied by a comment. Comments preserve the change history so reasoning is not lost when the description is overwritten.
@@ -138,6 +266,17 @@ A comment contains:
138
266
- Bullet points detailing what was added, changed, or removed.
139
267
- Any gaps or open questions that need input.
140
268
269
+
**Example:**
270
+
271
+
```markdown
272
+
Structured the issue description into the standard three-section format.
273
+
274
+
- Rewrote the context and request to separate user-facing behavior from technical details
275
+
- Added technical decisions section based on codebase research
276
+
- Created implementation plan with 6 tasks covering core changes, tests, and documentation
277
+
- Open question: should `-First` default to unlimited or require explicit opt-in? Marked as open in technical decisions.
278
+
```
279
+
141
280
## Formatting
142
281
143
282
Issues use [GitHub Flavored Markdown](https://github.github.com/gfm/) with the full feature set:
@@ -154,107 +293,99 @@ Issues use [GitHub Flavored Markdown](https://github.github.com/gfm/) with the f
154
293
-`[text](url)` links for all external references.
155
294
-**No hard line breaks within a paragraph.** GitHub renders mid-paragraph newlines as spaces, which creates inconsistent visual spacing.
156
295
157
-
## Examples
296
+
## Complete example
158
297
159
-
### Feature issue
298
+
A fully structured bug fix issue:
160
299
161
-
**Title:**`Add pagination support to Get-GitHubRepository`
300
+
**Title:**`Fix silent truncation of results in Get-GitHubRepository`
162
301
163
-
**Labels:**`Minor`, `Feature`
302
+
**Labels:**`Patch`, `Bug`
164
303
165
304
**Body:**
166
305
167
306
```markdown
168
-
A developer using Get-GitHubRepository to list all repositories in a large organization
169
-
receives only the first 30 results. There is no way to request additional pages or
170
-
automatically retrieve all results.
171
-
172
-
The function should support automatic pagination so that all repositories are returned
173
-
by default, with an optional parameter to limit the number of results.
174
-
175
-
**Acceptance criteria:**
307
+
`Get-GitHubRepository` is used in automation to sync all repositories for an account.
308
+
The script relies on getting the full list so it can detect new or removed repositories.
176
309
177
-
- Calling `Get-GitHubRepository -Owner 'LargeOrg'` returns all repositories, not just
178
-
the first page.
179
-
- A `-First` parameter limits the total number of results returned.
180
-
- Pagination follows the `Link` header pattern used by the GitHub REST API.
310
+
## Request
181
311
182
-
---
312
+
When `Get-GitHubRepository` is called on an account with more than 30 repositories, only
313
+
30 results are returned. There is no indication that results are incomplete, so it appears
314
+
as though the full list has been retrieved. The silent truncation causes scripts to miss
315
+
repositories, which can go unnoticed for weeks.
183
316
184
-
**Pagination strategy:** Follow the `Link` response header. Parse `rel="next"` and
185
-
continue requesting until no next link is present. This matches the approach already
186
-
used in `Get-GitHubRelease`.
317
+
### Reproduction steps
187
318
188
-
**Parameter naming:** Use `-First` (consistent with PowerShell conventions and
189
-
`Select-Object -First`). Considered `-Limit` but it conflicts with API terminology.
319
+
1. Create or use an account with more than 30 repositories
320
+
2. Run `Get-GitHubRepository`
321
+
3. Count the returned objects — only 30 are returned regardless of total count
190
322
191
-
**Rate limiting:** No special handling — the existing retry logic in
0 commit comments