Skip to content

Commit b9e5ea4

Browse files
committed
lint fix 1
1 parent 785eb29 commit b9e5ea4

File tree

2 files changed

+259
-259
lines changed

2 files changed

+259
-259
lines changed

pkg/github/repositories.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,23 +1363,23 @@ func filterPaths(entries []*github.TreeEntry, path string, maxResults int) []str
13631363
//
13641364
// The resolution logic follows a clear priority:
13651365
//
1366-
// 1. If a specific commit `sha` is provided, it takes precedence and is used directly,
1366+
// 1. If a specific commit `sha` is provided, it takes precedence and is used directly,
13671367
// and all reference resolution is skipped.
13681368
//
1369-
// 2. If no `sha` is provided, the function resolves the `ref`
1369+
// 2. If no `sha` is provided, the function resolves the `ref`
13701370
// string into a fully-qualified format (e.g., "refs/heads/main") by trying
13711371
// the following steps in order:
1372-
// a. **Empty Ref:** If `ref` is empty, the repository's default branch is used.
1373-
// b. **Fully-Qualified:** If `ref` already starts with "refs/", it's considered fully
1374-
// qualified and used as-is.
1375-
// c. **Partially-Qualified:** If `ref` starts with "heads/" or "tags/", it is
1376-
// prefixed with "refs/" to make it fully-qualified.
1377-
// d. **Short Name:** Otherwise, the `ref` is treated as a short name. The function
1378-
// first attempts to resolve it as a branch ("refs/heads/<ref>"). If that
1379-
// returns a 404 Not Found error, it then attempts to resolve it as a tag
1380-
// ("refs/tags/<ref>").
1372+
// a). **Empty Ref:** If `ref` is empty, the repository's default branch is used.
1373+
// b). **Fully-Qualified:** If `ref` already starts with "refs/", it's considered fully
1374+
// qualified and used as-is.
1375+
// c). **Partially-Qualified:** If `ref` starts with "heads/" or "tags/", it is
1376+
// prefixed with "refs/" to make it fully-qualified.
1377+
// d). **Short Name:** Otherwise, the `ref` is treated as a short name. The function
1378+
// first attempts to resolve it as a branch ("refs/heads/<ref>"). If that
1379+
// returns a 404 Not Found error, it then attempts to resolve it as a tag
1380+
// ("refs/tags/<ref>").
13811381
//
1382-
// 3. **Final Lookup:** Once a fully-qualified ref is determined, a final API call
1382+
// 3. **Final Lookup:** Once a fully-qualified ref is determined, a final API call
13831383
// is made to fetch that reference's definitive commit SHA.
13841384
//
13851385
// Any unexpected (non-404) errors during the resolution process are returned
@@ -1414,7 +1414,7 @@ func resolveGitReference(ctx context.Context, githubClient *github.Client, owner
14141414
// try to resolve the ref as a branch first.
14151415
if err == nil {
14161416
ref = "refs/heads/" + ref // It's a branch.
1417-
} else {
1417+
} else {
14181418
// The branch lookup failed. Check if it was a 404 Not Found error.
14191419
// If it was, we will try to resolve it as a tag.
14201420
ghErr, isGhErr := err.(*github.ErrorResponse)

0 commit comments

Comments
 (0)