Skip to content

Commit 94c4c09

Browse files
author
leonidas
committed
fix: Correct go fmt and remove comments in repositories.go
- Adjusted line spacing to satisfy go fmt. - Removed // <<< ADDED and // <<< MODIFIED comments.
1 parent feec5de commit 94c4c09

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pkg/github/repositories.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,9 @@ func CreateRepository(getClient GetClientFn, t translations.TranslationHelperFun
355355
mcp.WithBoolean("autoInit",
356356
mcp.Description("Initialize with README"),
357357
),
358-
mcp.WithString("organization", // <<< ADDED
359-
mcp.Description("Organization to create the repository in (optional, defaults to user account)"), // <<< ADDED
360-
), // <<< ADDED
358+
mcp.WithString("organization",
359+
mcp.Description("Organization to create the repository in (optional, defaults to user account)"),
360+
),
361361
),
362362
func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
363363
name, err := requiredParam[string](request, "name")
@@ -376,10 +376,10 @@ func CreateRepository(getClient GetClientFn, t translations.TranslationHelperFun
376376
if err != nil {
377377
return mcp.NewToolResultError(err.Error()), nil
378378
}
379-
organization, err := OptionalParam[string](request, "organization") // <<< ADDED
380-
if err != nil { // <<< ADDED
381-
return mcp.NewToolResultError(err.Error()), nil // <<< ADDED
382-
} // <<< ADDED
379+
organization, err := OptionalParam[string](request, "organization")
380+
if err != nil {
381+
return mcp.NewToolResultError(err.Error()), nil
382+
}
383383

384384
repo := &github.Repository{
385385
Name: github.Ptr(name),
@@ -392,7 +392,7 @@ func CreateRepository(getClient GetClientFn, t translations.TranslationHelperFun
392392
if err != nil {
393393
return nil, fmt.Errorf("failed to get GitHub client: %w", err)
394394
}
395-
createdRepo, resp, err := client.Repositories.Create(ctx, organization, repo) // <<< MODIFIED (organization)
395+
createdRepo, resp, err := client.Repositories.Create(ctx, organization, repo)
396396
if err != nil {
397397
return nil, fmt.Errorf("failed to create repository: %w", err)
398398
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy