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
Copy file name to clipboardExpand all lines: pkg/repoutil/README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ The `repoutil` package provides utility functions for working with GitHub reposi
4
4
5
5
## Overview
6
6
7
-
This package offers a single focused helper for parsing and validating `owner/repo`repository slug strings, which are used throughout the codebase wherever GitHub repositories are referenced.
7
+
This package offers focused helpers for parsing and normalizing repository identifiers, which are used throughout the codebase wherever GitHub repositories are referenced.
8
8
9
9
## Public API
10
10
@@ -13,6 +13,7 @@ This package offers a single focused helper for parsing and validating `owner/re
13
13
| Function | Signature | Description |
14
14
|----------|-----------|-------------|
15
15
|`SplitRepoSlug`|`func(slug string) (owner, repo string, err error)`| Splits a repository slug of the form `owner/repo` into its two components; returns an error when the slug does not contain exactly one `/` or when either component is empty |
16
+
|`NormalizeRepoForAPI`|`func(repo string) (ownerRepo string, host string)`| Splits a repository string of the form `[HOST/]owner/repo` into the `owner/repo` portion and an optional host name for GHES/Proxima API calls |
0 commit comments