MCPcopy Create free account
hub / github.com/cli/cli / generatePullRequestNodeID

Function generatePullRequestNodeID

pkg/cmd/agent-task/capi/sessions.go:548–550  ·  view source on GitHub ↗

generatePullRequestNodeID converts an int64 databaseID and repoID to a GraphQL Node ID format with the "PR_" prefix for pull requests

(repoID, pullRequestID int64)

Source from the content-addressed store, hash-verified

546// generatePullRequestNodeID converts an int64 databaseID and repoID to a GraphQL Node ID format
547// with the "PR_" prefix for pull requests
548func generatePullRequestNodeID(repoID, pullRequestID int64) string {
549 return "PR_" + api.EncodeNodeID(0, repoID, pullRequestID)
550}
551
552func generateUserNodeID(userID int64) string {
553 return "U_" + api.EncodeNodeID(0, userID)

Callers 1

Calls 1

EncodeNodeIDFunction · 0.92

Tested by

no test coverage detected