Skip to content

Commit d65d6fe

Browse files
committed
Tidepool sync
1 parent c2b390f commit d65d6fe

File tree

12 files changed

+15
-13
lines changed

12 files changed

+15
-13
lines changed

Scripts/sync.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Cocoa
88
import AsyncSwiftGit // @bdewey
99
import OctoKit // nerdishbynature/octokit.swift == main
1010

11-
let createPRs = false
11+
let createPRs = true
1212

1313
guard CommandLine.arguments.count == 3 else {
1414
print("usage: sync.swift <pull-request-title> <branch-name>")
@@ -106,7 +106,7 @@ for project in projects {
106106

107107
// Create and checkout the branch where sync changesets will go ("tidepool-sync")
108108
if !(try repository.branchExists(named: syncBranch)) {
109-
try repository.createBranch(named: syncBranch, target: project.branch)
109+
try repository.createBranch(named: syncBranch, target: "origin/\(project.branch)")
110110
}
111111
try await repository.checkout(revspec: syncBranch)
112112

@@ -120,7 +120,8 @@ for project in projects {
120120
print("No incoming changes; skipping PR creation.")
121121
try await repository.checkout(revspec: project.branch)
122122
continue
123-
}
123+
}
124+
print("Found diffs: \(diff)")
124125

125126
// Push changes up to origin
126127
let refspec = "refs/heads/" + syncBranch + ":refs/heads/" + syncBranch

0 commit comments

Comments
 (0)