MCPcopy Create free account
hub / github.com/bytebase/bytebase / GetProjectIDIssueUID

Function GetProjectIDIssueUID

backend/common/resource_name.go:206–216  ·  view source on GitHub ↗

GetProjectIDIssueUID returns the project ID and issue UID from the issue name.

(name string)

Source from the content-addressed store, hash-verified

204
205// GetProjectIDIssueUID returns the project ID and issue UID from the issue name.
206func GetProjectIDIssueUID(name string) (string, int64, error) {
207 tokens, err := GetNameParentTokens(name, ProjectNamePrefix, IssueNamePrefix)
208 if err != nil {
209 return "", 0, err
210 }
211 issueUID, err := strconv.ParseInt(tokens[1], 10, 64)
212 if err != nil {
213 return "", 0, errors.Errorf("invalid issue ID %q", tokens[1])
214 }
215 return tokens[0], issueUID, nil
216}
217
218// GetProjectIDIssueUIDIssueCommentID returns the project ID, issue UID and issue comment ID from the issue comment name.
219func GetProjectIDIssueUIDIssueCommentID(name string) (string, int64, string, error) {

Callers 8

GetListAccessGrantFilterFunction · 0.92
listIssueUIDsFunction · 0.92
convertToIssuesMethod · 0.92
convertToIssueCommentFunction · 0.92
ListIssueCommentsMethod · 0.92
UpdateIssueCommentMethod · 0.92
getIssueMessageMethod · 0.92

Calls 2

ErrorfMethod · 0.80
GetNameParentTokensFunction · 0.70

Tested by 1

listIssueUIDsFunction · 0.74