Skip to content

Commit 1e0b81e

Browse files
committed
Changing the parsing to strconv.ParseInt
1 parent 33b08af commit 1e0b81e

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

pkg/github/projects_resolver.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package github
33
import (
44
"context"
55
"fmt"
6+
"strconv"
67

78
ghErrors "github.com/github/github-mcp-server/pkg/errors"
89
"github.com/shurcooL/githubv4"
@@ -325,11 +326,8 @@ func resolveItemIDFromIssueArgs(ctx context.Context, gqlClient *githubv4.Client,
325326
return resolveProjectItemIDByIssueNumber(ctx, gqlClient, owner, ownerType, projectNumber, issueOwner, issueRepo, issueNumber)
326327
}
327328

328-
// parseInt64 parses a decimal string into int64.
329329
func parseInt64(s string) (int64, error) {
330-
var n int64
331-
_, err := fmt.Sscanf(s, "%d", &n)
332-
return n, err
330+
return strconv.ParseInt(s, 10, 64)
333331
}
334332

335333
// resolveFieldNamesToIDs resolves field names to numeric IDs in one GraphQL

0 commit comments

Comments
 (0)