Repository navigation
Commit ef63672
committed
Skip baseRefName in PR updates when the base is unchanged
The updatePullRequest GraphQL mutation always included baseRefName,
even when the value matched the PR's current base. GitHub's Stacks
feature rejects any mutation that includes baseRefName on a stacked
PR, causing "Cannot change the base branch because the pull request
is part of a stack" errors on pushes that only update the title or
body.
Add a skipBaseUpdate flag to updatePullRequest. The push flow now
compares each PR's base against the existing PR and omits baseRefName
from the mutation when it hasn't changed. The dissolve-before-push
path still fires when bases actually need retargeting (commit
reordering), so the stacks API interaction is unchanged for that case.
commit-id: I721013cf1 parent a9f640f commit ef63672
3 files changed
Lines changed: 13 additions & 7 deletions
File tree
- git-jaspr/src
- main/kotlin/sims/michael/gitjaspr
- test/kotlin/sims/michael/gitjaspr/githubtests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
144 | 149 | | |
145 | 150 | | |
146 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1441 | 1441 | | |
1442 | 1442 | | |
1443 | 1443 | | |
1444 | | - | |
1445 | 1444 | | |
1446 | 1445 | | |
1447 | | - | |
1448 | | - | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
1449 | 1450 | | |
1450 | 1451 | | |
1451 | 1452 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
0 commit comments