(body, commit_hash, title)
| 174 | |
| 175 | |
| 176 | def parse_pr_number(body, commit_hash, title): |
| 177 | regex = r"Pull Request resolved: https://github.com/pytorch/pytorch/pull/([0-9]+)" |
| 178 | matches = re.findall(regex, body) |
| 179 | if len(matches) == 0: |
| 180 | if "revert" not in title.lower() and "updating submodules" not in title.lower(): |
| 181 | print(f"[{commit_hash}: {title}] Could not parse PR number, ignoring PR") |
| 182 | return None |
| 183 | if len(matches) > 1: |
| 184 | print(f"[{commit_hash}: {title}] Got two PR numbers, using the first one") |
| 185 | return matches[0] |
| 186 | return matches[0] |
| 187 | |
| 188 | |
| 189 | def get_ghstack_token(): |
no test coverage detected
searching dependent graphs…