Repository navigation
Commit 24f0437
committed
Dissolve and recreate GitHub stack on every push
The updatePullRequest GraphQL mutation includes baseRefName, and
GitHub rejects that field on PRs that are part of a stack, even when
the value hasn't changed. Rather than conditionally omitting the
field, dissolve the stack before updating PRs and recreate it after.
This is simpler and handles all cases (reordering, appending, and
no-change pushes) uniformly.
Also fix findExistingStack to search all PR numbers instead of just
the first, since the API response order is not guaranteed and the
first PR might not be in the existing stack.
commit-id: I007433821 parent a9f640f commit 24f0437
2 files changed
Lines changed: 18 additions & 96 deletions
File tree
- git-jaspr/src
- main/kotlin/sims/michael/gitjaspr
- test/kotlin/sims/michael/gitjaspr
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 149 | + | |
153 | 150 | | |
154 | 151 | | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | 152 | | |
174 | 153 | | |
175 | 154 | | |
| |||
1305 | 1284 | | |
1306 | 1285 | | |
1307 | 1286 | | |
1308 | | - | |
1309 | | - | |
1310 | | - | |
1311 | | - | |
1312 | | - | |
1313 | | - | |
1314 | | - | |
1315 | | - | |
1316 | | - | |
1317 | | - | |
1318 | | - | |
1319 | | - | |
1320 | | - | |
1321 | | - | |
1322 | | - | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
1323 | 1295 | | |
| 1296 | + | |
1324 | 1297 | | |
1325 | 1298 | | |
1326 | 1299 | | |
| |||
1485 | 1458 | | |
1486 | 1459 | | |
1487 | 1460 | | |
1488 | | - | |
| 1461 | + | |
1489 | 1462 | | |
1490 | 1463 | | |
1491 | 1464 | | |
| |||
2667 | 2640 | | |
2668 | 2641 | | |
2669 | 2642 | | |
2670 | | - | |
2671 | | - | |
2672 | | - | |
2673 | | - | |
2674 | | - | |
2675 | | - | |
2676 | | - | |
2677 | | - | |
2678 | | - | |
2679 | | - | |
2680 | | - | |
2681 | | - | |
2682 | | - | |
2683 | | - | |
2684 | | - | |
2685 | | - | |
2686 | | - | |
2687 | | - | |
2688 | 2643 | | |
2689 | 2644 | | |
2690 | 2645 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10976 | 10976 | | |
10977 | 10977 | | |
10978 | 10978 | | |
10979 | | - | |
10980 | | - | |
10981 | | - | |
10982 | | - | |
10983 | | - | |
10984 | | - | |
10985 | | - | |
10986 | | - | |
10987 | | - | |
10988 | | - | |
10989 | | - | |
10990 | | - | |
10991 | | - | |
10992 | | - | |
10993 | | - | |
10994 | | - | |
10995 | | - | |
10996 | | - | |
10997 | | - | |
10998 | | - | |
10999 | | - | |
11000 | | - | |
11001 | | - | |
11002 | | - | |
11003 | | - | |
11004 | | - | |
11005 | 10979 | | |
11006 | 10980 | | |
11007 | 10981 | | |
| |||
11126 | 11100 | | |
11127 | 11101 | | |
11128 | 11102 | | |
11129 | | - | |
| 11103 | + | |
11130 | 11104 | | |
11131 | 11105 | | |
11132 | 11106 | | |
| |||
11142 | 11116 | | |
11143 | 11117 | | |
11144 | 11118 | | |
11145 | | - | |
11146 | | - | |
| 11119 | + | |
11147 | 11120 | | |
11148 | 11121 | | |
11149 | 11122 | | |
| |||
11162 | 11135 | | |
11163 | 11136 | | |
11164 | 11137 | | |
11165 | | - | |
11166 | | - | |
11167 | | - | |
11168 | | - | |
11169 | | - | |
11170 | | - | |
11171 | | - | |
| 11138 | + | |
11172 | 11139 | | |
11173 | 11140 | | |
11174 | 11141 | | |
| |||
0 commit comments