GetProjectIDIssueUID returns the project ID and issue UID from the issue name.
(name string)
| 204 | |
| 205 | // GetProjectIDIssueUID returns the project ID and issue UID from the issue name. |
| 206 | func 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. |
| 219 | func GetProjectIDIssueUIDIssueCommentID(name string) (string, int64, string, error) { |