@@ -355,9 +355,9 @@ func CreateRepository(getClient GetClientFn, t translations.TranslationHelperFun
355
355
mcp .WithBoolean ("autoInit" ,
356
356
mcp .Description ("Initialize with README" ),
357
357
),
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
+ ),
361
361
),
362
362
func (ctx context.Context , request mcp.CallToolRequest ) (* mcp.CallToolResult , error ) {
363
363
name , err := requiredParam [string ](request , "name" )
@@ -376,10 +376,10 @@ func CreateRepository(getClient GetClientFn, t translations.TranslationHelperFun
376
376
if err != nil {
377
377
return mcp .NewToolResultError (err .Error ()), nil
378
378
}
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
+ }
383
383
384
384
repo := & github.Repository {
385
385
Name : github .Ptr (name ),
@@ -392,7 +392,7 @@ func CreateRepository(getClient GetClientFn, t translations.TranslationHelperFun
392
392
if err != nil {
393
393
return nil , fmt .Errorf ("failed to get GitHub client: %w" , err )
394
394
}
395
- createdRepo , resp , err := client .Repositories .Create (ctx , organization , repo ) // <<< MODIFIED (organization)
395
+ createdRepo , resp , err := client .Repositories .Create (ctx , organization , repo )
396
396
if err != nil {
397
397
return nil , fmt .Errorf ("failed to create repository: %w" , err )
398
398
}
0 commit comments