@buddysh/buddy 0.11.8 → 0.11.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/bin/cli.ts +15 -3
- package/dist/bin/cli.js +63 -63
- package/dist/{chunk-4s12xebp.js → chunk-2fx0tbc0.js} +1 -1
- package/dist/{chunk-1eh199jk.js → chunk-34rmja4x.js} +1 -1
- package/dist/{chunk-n0mvh9p4.js → chunk-4zvjzesh.js} +1 -1
- package/dist/{chunk-nvz9jajn.js → chunk-9634xcvq.js} +1 -1
- package/dist/{chunk-mcn3508w.js → chunk-a34szd4r.js} +1 -1
- package/dist/{chunk-7gd1et2j.js → chunk-d4wqe366.js} +1 -1
- package/dist/{chunk-qtyr3kqj.js → chunk-db9rffcf.js} +1 -1
- package/dist/{chunk-fystbk81.js → chunk-fpzgxg8a.js} +1 -1
- package/dist/{chunk-c8g8z15b.js → chunk-jxd64dzs.js} +1 -1
- package/dist/{chunk-xvae9y99.js → chunk-pksrcdh6.js} +1 -1
- package/dist/{chunk-z24p5t3p.js → chunk-r7nh070r.js} +1 -1
- package/dist/{chunk-wtt17gzv.js → chunk-s3q7g2hy.js} +1 -1
- package/dist/{chunk-b8t39c5t.js → chunk-sdhyhefy.js} +1 -1
- package/dist/{chunk-3w79fw62.js → chunk-sxdfmskp.js} +1 -1
- package/dist/{chunk-er0ntw4q.js → chunk-tx9m7y1z.js} +1 -1
- package/dist/{chunk-f0gag8vx.js → chunk-xffrrs85.js} +1 -1
- package/dist/{chunk-5dscgksz.js → chunk-xps8n8nj.js} +1 -1
- package/dist/src/git/github-provider.d.ts +1 -0
- package/dist/src/git/provider.d.ts +1 -0
- package/dist/src/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
[Compare changes](https://github.com/stacksjs/buddy/compare/v0.11.8...v0.11.9)
|
|
4
|
+
|
|
5
|
+
## 🐛 Bug Fixes
|
|
6
|
+
|
|
7
|
+
- **rebase**: rebase a ticked PR, and one whose branch is behind its base ([343032f](https://github.com/stacksjs/buddy/commit/343032f)) _(by Chris <chrisbreuer93@gmail.com>)_
|
|
8
|
+
|
|
9
|
+
## 🔧 Chores
|
|
10
|
+
|
|
11
|
+
- release v0.11.9 ([4f1a20a](https://github.com/stacksjs/buddy/commit/4f1a20a)) _(by Chris <chrisbreuer93@gmail.com>)_
|
|
12
|
+
|
|
13
|
+
## Contributors
|
|
14
|
+
|
|
15
|
+
- _Chris <chrisbreuer93@gmail.com>_
|
|
16
|
+
|
|
3
17
|
[Compare changes](https://github.com/stacksjs/buddy/compare/v0.11.7...v0.11.8)
|
|
4
18
|
|
|
5
19
|
## 🐛 Bug Fixes
|
package/bin/cli.ts
CHANGED
|
@@ -1012,7 +1012,16 @@ cli
|
|
|
1012
1012
|
),
|
|
1013
1013
|
)
|
|
1014
1014
|
|
|
1015
|
-
|
|
1015
|
+
// Matching versions say nothing about the branch itself: one cut from
|
|
1016
|
+
// an older base can fail CI for reasons long since fixed there.
|
|
1017
|
+
const baseBranch = config.repository.baseBranch || 'main'
|
|
1018
|
+
const behind = upToDate && gitProvider.isBranchBehind
|
|
1019
|
+
? await gitProvider.isBranchBehind(pr.head, baseBranch).catch(() => false)
|
|
1020
|
+
: false
|
|
1021
|
+
if (behind)
|
|
1022
|
+
logger.info(`🔄 ${pr.head} is behind ${baseBranch}; rebasing`)
|
|
1023
|
+
|
|
1024
|
+
if (upToDate && !behind) {
|
|
1016
1025
|
logger.success('✅ PR is already up to date, no rebase needed')
|
|
1017
1026
|
logger.info('💡 Use --force to rebase anyway')
|
|
1018
1027
|
return
|
|
@@ -1203,9 +1212,12 @@ cli
|
|
|
1203
1212
|
logger.info(`🔄 Rebasing PR #${pr.number} via rebase command...`)
|
|
1204
1213
|
|
|
1205
1214
|
try {
|
|
1206
|
-
// Use the existing rebase command logic
|
|
1215
|
+
// Use the existing rebase command logic. --force because a
|
|
1216
|
+
// person ticked "rebase/retry": the command's own up-to-date
|
|
1217
|
+
// check would otherwise decline a branch whose updates still
|
|
1218
|
+
// match, however far behind its base it is.
|
|
1207
1219
|
const { spawn } = await import('node:child_process')
|
|
1208
|
-
const rebaseProcess = spawn('bunx', ['@buddysh/buddy', 'rebase', pr.number.toString()], {
|
|
1220
|
+
const rebaseProcess = spawn('bunx', ['@buddysh/buddy', 'rebase', pr.number.toString(), '--force'], {
|
|
1209
1221
|
stdio: 'inherit',
|
|
1210
1222
|
cwd: process.cwd(),
|
|
1211
1223
|
})
|