Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pkg/repoutil/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,20 @@ if err != nil {
**Internal**:
- `github.com/github/gh-aw/pkg/logger` — debug logging

## Thread Safety

Both functions are pure and stateless; they MAY be called concurrently without synchronization.

## Design Notes

- All debug output uses `logger.New("repoutil:repoutil")` and is only emitted when `DEBUG=repoutil:*`.
- For paths that include sub-folders (e.g. GitHub Actions `uses:` fields such as `github/codeql-action/upload-sarif`), use `gitutil.ExtractBaseRepo` first to strip the sub-path before calling `SplitRepoSlug`.
- `NormalizeRepoForAPI` only treats three-segment strings as `HOST/owner/repo`; plain `owner/repo` values are returned unchanged with an empty host.

## Source Synchronization

Reviewed against source on 2026-07-26; no public-contract deltas identified.

---

*This specification is automatically maintained by the [spec-extractor](../../.github/workflows/spec-extractor.md) workflow.*
8 changes: 8 additions & 0 deletions pkg/sliceutil/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,21 @@ keys := sliceutil.SortedKeys(m)
**External**:
- None beyond the Go standard library (`slices`).

## Thread Safety

All functions in this package are pure and stateless — they create and return new slices or maps without writing to shared state. Callers MAY call any function concurrently without synchronization.

## Design Notes

- `Any` is implemented via `slices.ContainsFunc` from the standard library.
- `Deduplicate`, `MergeUnique`, and `Exclude` use hash sets (`map[T]struct{}`) for O(n) behavior.
- `SortedKeys` delegates to `slices.Sorted(maps.Keys(m))` from the standard library and returns a new sorted slice each call.
- None of the other functions sort their output; callers that require sorted results should call `slices.Sort` on the returned slice.

## Source Synchronization

Reviewed against source on 2026-07-26; no public-contract deltas identified.

---

*This specification is automatically maintained by the [spec-extractor](../../.github/workflows/spec-extractor.md) workflow.*
Loading