Commit 9f4ff02
authored
Handle closed pull requests and empty pull requests with no commit (#6108)
Fixes #6106. The issue is
caused by an closed empty pull request with no commit
pytorch/pytorch#143615.
* Handle a PR with no commit in `fetchPR`. This function is used by
Dr.CI to get all the commits in a pull request.
* Make sure that Dr.CI only queries for open pull requests.
* Fix the broken HUD PR page https://hud.pytorch.org/pr/143615
### Testing
Both
```
curl --request POST \
--url 'http://localhost:3000/api/drci/drci' \
--header 'Authorization: <REDACTED>' \
--data 'repo=pytorch'
```
and
```
curl --request POST \
--url 'http://localhost:3000/api/drci/drci?prNumber=143615' \
--header 'Authorization: <REDACTED>' \
--data 'repo=pytorch'
```
are working ok now.
https://torchci-git-fork-huydhn-fix-drci-issue-6106-fbopensource.vercel.app/pr/143615
can be loaded now.1 parent 46989f6 commit 9f4ff02
File tree
4 files changed
+28
-14
lines changed- torchci
- clickhouse_queries/recent_pr_workflows_query
- lib
- pages
- [repoOwner]/[repoName]/pull
- api/drci
4 files changed
+28
-14
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
Lines changed: 18 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| |||
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| 134 | + | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
| |||
156 | 158 | | |
157 | 159 | | |
158 | 160 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
167 | 164 | | |
168 | 165 | | |
169 | | - | |
| 166 | + | |
| 167 | + | |
170 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
171 | 178 | | |
172 | 179 | | |
173 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
| 308 | + | |
309 | 309 | | |
310 | 310 | | |
| 311 | + | |
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
314 | 315 | | |
315 | | - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
316 | 319 | | |
317 | 320 | | |
318 | 321 | | |
| |||
0 commit comments