parseIssueNo parses the issue number out of the issue url. 0 is returned if url does not correspond to an issue.
(url string)
| 135 | // |
| 136 | // 0 is returned if url does not correspond to an issue. |
| 137 | func parseIssueNo(url string) (int, error) { |
| 138 | // First check if I can handle the TODO. |
| 139 | var idStr string |
| 140 | for _, p := range issuePrefixes { |
| 141 | if str := strings.TrimPrefix(url, p); len(str) < len(url) { |
| 142 | idStr = str |
| 143 | break |
| 144 | } |
| 145 | } |
| 146 | if len(idStr) == 0 { |
| 147 | return 0, nil |
| 148 | } |
| 149 | |
| 150 | id, err := strconv.ParseInt(strings.TrimRight(idStr, "/"), 10, 64) |
| 151 | if err != nil { |
| 152 | return 0, err |
| 153 | } |
| 154 | return int(id), nil |
| 155 | } |
| 156 | |
| 157 | func processAllPages(fn func(github.ListOptions) (*github.Response, error)) error { |
| 158 | opts := github.ListOptions{PerPage: 1000} |
no outgoing calls
searching dependent graphs…