@markjaquith/agency 1.8.7 → 1.9.0
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/cli.ts +4 -0
- package/package.json +1 -1
- package/src/commands/push.ts +18 -9
- package/src/services/GitService.ts +4 -0
package/cli.ts
CHANGED
|
@@ -186,6 +186,7 @@ const commands: Record<string, Command> = {
|
|
|
186
186
|
emit: options.emit || options.branch,
|
|
187
187
|
silent: options.silent,
|
|
188
188
|
force: options.force,
|
|
189
|
+
noVerify: options["no-verify"],
|
|
189
190
|
verbose: options.verbose,
|
|
190
191
|
pr: options.pr,
|
|
191
192
|
}),
|
|
@@ -593,6 +594,9 @@ try {
|
|
|
593
594
|
type: "boolean",
|
|
594
595
|
short: "f",
|
|
595
596
|
},
|
|
597
|
+
"no-verify": {
|
|
598
|
+
type: "boolean",
|
|
599
|
+
},
|
|
596
600
|
verbose: {
|
|
597
601
|
type: "boolean",
|
|
598
602
|
short: "v",
|
package/package.json
CHANGED
package/src/commands/push.ts
CHANGED
|
@@ -19,6 +19,7 @@ interface PushOptions extends BaseCommandOptions {
|
|
|
19
19
|
emit?: string
|
|
20
20
|
branch?: string // Deprecated: use emit instead
|
|
21
21
|
force?: boolean
|
|
22
|
+
noVerify?: boolean
|
|
22
23
|
pr?: boolean
|
|
23
24
|
skipFilter?: boolean
|
|
24
25
|
}
|
|
@@ -186,6 +187,7 @@ const pushCore = (gitRoot: string, options: PushOptions) =>
|
|
|
186
187
|
withSpinner(
|
|
187
188
|
pushBranchToRemoteEffect(gitRoot, emitBranchName, remote, {
|
|
188
189
|
force: options.force,
|
|
190
|
+
noVerify: options.noVerify,
|
|
189
191
|
verbose: options.verbose,
|
|
190
192
|
}),
|
|
191
193
|
{
|
|
@@ -243,16 +245,17 @@ const pushBranchToRemoteEffect = (
|
|
|
243
245
|
remote: string,
|
|
244
246
|
options: {
|
|
245
247
|
readonly force?: boolean
|
|
248
|
+
readonly noVerify?: boolean
|
|
246
249
|
readonly verbose?: boolean
|
|
247
250
|
},
|
|
248
251
|
) =>
|
|
249
252
|
Effect.gen(function* () {
|
|
250
253
|
const git = yield* GitService
|
|
251
|
-
const { force = false } = options
|
|
254
|
+
const { force = false, noVerify = false } = options
|
|
252
255
|
|
|
253
256
|
// Try pushing without force first
|
|
254
257
|
const pushResult = yield* git
|
|
255
|
-
.push(gitRoot, remote, branchName, { setUpstream: true })
|
|
258
|
+
.push(gitRoot, remote, branchName, { setUpstream: true, noVerify })
|
|
256
259
|
.pipe(
|
|
257
260
|
Effect.catchAll((error: any) =>
|
|
258
261
|
Effect.succeed({
|
|
@@ -275,7 +278,11 @@ const pushBranchToRemoteEffect = (
|
|
|
275
278
|
if (needsForce && force) {
|
|
276
279
|
// User provided --force flag, retry with force
|
|
277
280
|
const forceResult = yield* git
|
|
278
|
-
.push(gitRoot, remote, branchName, {
|
|
281
|
+
.push(gitRoot, remote, branchName, {
|
|
282
|
+
setUpstream: true,
|
|
283
|
+
force: true,
|
|
284
|
+
noVerify,
|
|
285
|
+
})
|
|
279
286
|
.pipe(
|
|
280
287
|
Effect.catchAll((error: any) =>
|
|
281
288
|
Effect.succeed({
|
|
@@ -405,15 +412,17 @@ Arguments:
|
|
|
405
412
|
|
|
406
413
|
Options:
|
|
407
414
|
--emit Custom name for emit branch (defaults to pattern from config)
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
415
|
+
--branch (Deprecated: use --emit) Custom name for emit branch
|
|
416
|
+
-f, --force Force push to remote if branch has diverged
|
|
417
|
+
--no-verify Bypass git pre-push hooks
|
|
418
|
+
--pr Open GitHub PR in browser after pushing (requires gh CLI)
|
|
411
419
|
|
|
412
420
|
Examples:
|
|
413
421
|
agency push # Create PR, push, return to source
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
422
|
+
agency push origin/main # Explicitly use origin/main as base
|
|
423
|
+
agency push --force # Force push if branch has diverged
|
|
424
|
+
agency push --no-verify # Push without running pre-push hooks
|
|
425
|
+
agency push --pr # Push and open GitHub PR in browser
|
|
417
426
|
|
|
418
427
|
Notes:
|
|
419
428
|
- Must be run from a source branch (not a emit branch)
|
|
@@ -1046,6 +1046,7 @@ export class GitService extends Effect.Service<GitService>()("GitService", {
|
|
|
1046
1046
|
options?: {
|
|
1047
1047
|
readonly setUpstream?: boolean
|
|
1048
1048
|
readonly force?: boolean
|
|
1049
|
+
readonly noVerify?: boolean
|
|
1049
1050
|
},
|
|
1050
1051
|
) => {
|
|
1051
1052
|
const args = ["git", "push"]
|
|
@@ -1055,6 +1056,9 @@ export class GitService extends Effect.Service<GitService>()("GitService", {
|
|
|
1055
1056
|
if (options?.force) {
|
|
1056
1057
|
args.push("--force")
|
|
1057
1058
|
}
|
|
1059
|
+
if (options?.noVerify) {
|
|
1060
|
+
args.push("--no-verify")
|
|
1061
|
+
}
|
|
1058
1062
|
args.push(remote, branch)
|
|
1059
1063
|
|
|
1060
1064
|
return pipe(
|