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
- Extract dual-fetch logic into listProjectsFromBothOwnerTypes helper
- Rename addProjectItemWithResolution to addProjectItem (old function removed)
- Add GraphQL test coverage for add_project_item using githubv4mock
- Tests cover both org/issue and user/pull_request success paths
if (userErr!=nil||userResp.StatusCode!=http.StatusOK) && (orgErr!=nil||orgResp.StatusCode!=http.StatusOK) {
1507
-
returnutils.NewToolResultError(fmt.Sprintf("failed to list projects for owner '%s': not found as user or organization", owner)), nil, nil
1508
-
}
1509
-
1510
-
response:=map[string]any{
1511
-
"projects": minimalProjects,
1512
-
"note": "Results include both user and org projects. Each project includes 'owner_type' field. Pagination is limited when owner_type is not specified - specify 'owner_type' for full pagination support.",
1513
-
}
1514
-
ifresp!=nil {
1515
-
response["pageInfo"] =buildPageInfo(resp)
1516
-
deferfunc() { _=resp.Body.Close() }()
1517
-
}
1518
-
1519
-
r, err:=json.Marshal(response)
1520
-
iferr!=nil {
1521
-
returnnil, nil, fmt.Errorf("failed to marshal response: %w", err)
returnutils.NewToolResultError(fmt.Sprintf("failed to list projects for owner '%s': not found as user or organization", owner)), nil, nil
1556
+
}
1557
+
1558
+
response:=map[string]any{
1559
+
"projects": minimalProjects,
1560
+
"note": "Results include both user and org projects. Each project includes 'owner_type' field. Pagination is limited when owner_type is not specified - specify 'owner_type' for full pagination support.",
1561
+
}
1562
+
ifresp!=nil {
1563
+
response["pageInfo"] =buildPageInfo(resp)
1564
+
deferfunc() { _=resp.Body.Close() }()
1565
+
}
1566
+
1567
+
r, err:=json.Marshal(response)
1568
+
iferr!=nil {
1569
+
returnnil, nil, fmt.Errorf("failed to marshal response: %w", err)
0 commit comments