smart-commit-copilot-cli 0.1.9 → 0.1.11
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 +21 -0
- package/README.md +332 -64
- package/docs/publish.md +1 -1
- package/docs/releases/0.1.10-draft.md +61 -0
- package/docs/releases/0.1.11-draft.md +52 -0
- package/examples/config/smart-commit.json +6 -2
- package/out/cli.js +22 -2
- package/out/cli.js.map +1 -1
- package/out/cliApp.js +47 -6
- package/out/cliApp.js.map +1 -1
- package/out/spinner.js +37 -0
- package/out/spinner.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,27 @@ The format is based on Keep a Changelog, and this project follows Semantic Versi
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.1.11] - 2026-05-23
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- README now documents staged change summaries, PR/MR creation, the `bridge` step table, a full inline `smartCommitCli` config example, and expanded CLI flag and environment variable references
|
|
14
|
+
- example config now includes `connection.extraHeaders`, `connection.requestTimeoutMs`, and illustrative review and commit-message `promptTuning` values aligned with the README
|
|
15
|
+
- publish guidance now points to the `0.1.11` release draft during pre-publish review
|
|
16
|
+
|
|
17
|
+
## [0.1.10] - 2026-05-22
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- TTY spinner on stderr for long-running async commands: `bridge`, `report generate`, and `pull-request create`
|
|
22
|
+
- structured `[PR][INFO]` and `[PR][WARN]` log lines for `pull-request create` and bridge auto PR/MR creation outcomes
|
|
23
|
+
- regression coverage for spinner TTY behavior and pull-request create log formatting
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- `pull-request create` now routes through the async CLI path so network and LLM work no longer blocks the synchronous command dispatcher
|
|
28
|
+
- publish guidance now points to the `0.1.10` release draft during pre-publish review
|
|
29
|
+
|
|
9
30
|
## [0.1.9] - 2026-05-22
|
|
10
31
|
|
|
11
32
|
### Added
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# smart-commit CLI
|
|
2
2
|
|
|
3
|
-
`smart-commit CLI` is a shell-first tool for AI-assisted commit review, commit-message generation, optional Git execution, and local reporting.
|
|
3
|
+
`smart-commit CLI` is a shell-first tool for AI-assisted commit review, commit-message generation, optional Git execution, staged change summaries, PR/MR creation, and local reporting.
|
|
4
4
|
|
|
5
5
|
Use it when you want one repeatable workflow that can run from:
|
|
6
6
|
|
|
@@ -19,8 +19,11 @@ It can:
|
|
|
19
19
|
- use bundled review skills, including `c-code-review`, with diff-aware generic fallback
|
|
20
20
|
- optionally create a commit
|
|
21
21
|
- optionally push the current branch
|
|
22
|
-
-
|
|
23
|
-
-
|
|
22
|
+
- generate staged change summaries after successful review, commit, or push flows
|
|
23
|
+
- auto-create GitHub PRs or GitLab MRs after a successful push when configured
|
|
24
|
+
- create or dry-run PR/MR content through standalone `pull-request create`
|
|
25
|
+
- persist successful run history in pass history
|
|
26
|
+
- generate local or AI-enhanced daily, yesterday, weekly, last-week, monthly, last-month, quarterly, last-quarter, or yearly Markdown work reports
|
|
24
27
|
|
|
25
28
|
## Who This Is For
|
|
26
29
|
|
|
@@ -29,35 +32,46 @@ This tool is a good fit if you want to:
|
|
|
29
32
|
- review staged changes before committing
|
|
30
33
|
- standardize commit messages
|
|
31
34
|
- run the same workflow locally and in automation
|
|
32
|
-
-
|
|
35
|
+
- automate review-to-PR/MR flows from the CLI, hooks, or agents
|
|
36
|
+
- generate staged-change or PR/MR-ready summaries without opening another tool
|
|
37
|
+
- keep a lightweight pass history for successful automation runs
|
|
33
38
|
- generate periodic reports from local pass history
|
|
34
39
|
|
|
35
|
-
If you are using this for the first time, start with review-only mode and keep Git side effects disabled
|
|
40
|
+
If you are using this for the first time, start with review-only mode and keep Git side effects disabled. Enable commit, push, staged summaries, and PR/MR creation gradually after you trust the workflow.
|
|
36
41
|
|
|
37
42
|
## What Happens In A Typical Run
|
|
38
43
|
|
|
39
44
|
At a high level, `smart-commit bridge` does this:
|
|
40
45
|
|
|
41
|
-
1.
|
|
42
|
-
2.
|
|
43
|
-
3.
|
|
44
|
-
4.
|
|
45
|
-
5.
|
|
46
|
-
6.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
46
|
+
1. resolves config and `env:VAR_NAME` references
|
|
47
|
+
2. verifies `--repo` and reads the staged diff, auto-staging only if configured
|
|
48
|
+
3. generates or validates the commit message
|
|
49
|
+
4. runs AI review and applies the score threshold
|
|
50
|
+
5. optionally creates a local commit, pushes, writes a staged change summary, and creates a PR/MR
|
|
51
|
+
6. optionally records the furthest successful stage into pass history
|
|
52
|
+
|
|
53
|
+
| Step | When it runs | What it does | Output / side effect |
|
|
54
|
+
| --- | --- | --- | --- |
|
|
55
|
+
| Resolve config | Every `bridge` run | Merges CLI flags, environment variables, config file values, and defaults; resolves `env:...` references. | Validated runtime config with secrets redacted from output. |
|
|
56
|
+
| Prepare Git input | Every `bridge` run | Verifies `--repo` is inside a Git repository and reads the staged diff. If the index is empty and `git.autoStageWhenNothingStaged=true`, it can run `git add -A`. | A staged diff snapshot for review and commit-message generation. |
|
|
57
|
+
| Commit message | Every run that reaches review prep | Uses `commitMessage.input`, generates a message, or refines a draft depending on config. Validation can enforce structure, protocol, ticket IDs, and regex rules. | Final commit message or a blocked result before review. |
|
|
58
|
+
| AI review | Every non-dry-run `bridge` execution | Reviews the staged diff and compares the final score with `review.threshold`. | `passed`, `blocked`, or `error` bridge output. |
|
|
59
|
+
| Commit | Only when review passes and `git.autoCommit=true` | Creates a local Git commit with the final commit message. | New local commit. |
|
|
60
|
+
| Push | Only when commit succeeds and `git.autoPush=true` | Pushes the current branch to its configured upstream. | Remote branch update, or a push-phase runtime error. |
|
|
61
|
+
| Staged change summary | Only after a successful review-only, commit-only, or push run when `stagedChangeSummary.enabled=true` | Writes a Markdown summary for the reviewed staged change. | Markdown file under the configured summary directory. |
|
|
62
|
+
| PR/MR auto-create | Only after a successful push when `pullRequest.autoCreateAfterPush=true` | Creates or detects an existing GitHub pull request or GitLab merge request. | `pullRequestCreation` details in bridge JSON output. |
|
|
63
|
+
| Pass history | Only when `passHistory.enabled=true` and the configured `passHistory.writeStage` is reached | Records or upgrades the successful run to the furthest completed stage. | Local pass-history record for later reporting. |
|
|
64
|
+
|
|
65
|
+
Optional follow-up commands:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
smart-commit pull-request create --repo . --config ./smart-commit.json --target-branch main --dry-run
|
|
69
|
+
smart-commit pull-request create --repo . --config ./smart-commit.json --target-branch main
|
|
70
|
+
smart-commit report generate --repo . --config ./smart-commit.json --period weekly
|
|
59
71
|
```
|
|
60
72
|
|
|
73
|
+
`smart-commit pull-request create` is an independent PR/MR command. `smart-commit report generate` summarizes existing pass-history records; it is not part of every `bridge` run.
|
|
74
|
+
|
|
61
75
|
## Prerequisites
|
|
62
76
|
|
|
63
77
|
Before you run the CLI, make sure you have:
|
|
@@ -318,17 +332,113 @@ If you set `review.skill.path`, the CLI keeps the current file-based custom-skil
|
|
|
318
332
|
|
|
319
333
|
`connection.llmResponseCorrectionRetryCount` controls how many extra repair or regeneration attempts the CLI may request when a review result or generated commit message fails protocol, JSON-shape, or language validation. The default is `3`, the supported range is `0..10`, and network, HTTP, timeout, or provider failures are not retried by this setting.
|
|
320
334
|
|
|
321
|
-
###
|
|
335
|
+
### Full Configuration Example
|
|
322
336
|
|
|
323
|
-
This
|
|
337
|
+
This example shows the complete `smartCommitCli` config surface in one place.
|
|
324
338
|
|
|
325
|
-
|
|
339
|
+
It is useful for learning all available config fields, but note that it enables:
|
|
326
340
|
|
|
327
341
|
- `git.autoCommit = true`
|
|
328
342
|
- `git.autoPush = true`
|
|
329
343
|
|
|
330
344
|
For first use, do not copy those values blindly. Start with `false` for both and enable them later only if you want the CLI to own those Git side effects.
|
|
331
345
|
|
|
346
|
+
```json
|
|
347
|
+
{
|
|
348
|
+
"smartCommitCli": {
|
|
349
|
+
"connection": {
|
|
350
|
+
"baseUrl": "https://api.openai.com/v1",
|
|
351
|
+
"apiKey": "env:SMART_COMMIT_API_KEY",
|
|
352
|
+
"model": "gpt-5",
|
|
353
|
+
"extraHeaders": {
|
|
354
|
+
"X-Client": "smart-commit-cli"
|
|
355
|
+
},
|
|
356
|
+
"requestTimeoutMs": 1000000,
|
|
357
|
+
"llmResponseCorrectionRetryCount": 3
|
|
358
|
+
},
|
|
359
|
+
"review": {
|
|
360
|
+
"threshold": 6,
|
|
361
|
+
"language": "zh-cn",
|
|
362
|
+
"maxDiffChars": 100000,
|
|
363
|
+
"skill": {
|
|
364
|
+
"id": "code-review",
|
|
365
|
+
"path": "",
|
|
366
|
+
"promptTuning": "Ignore findings that only complain about the project's required logging wrapper."
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
"commitMessage": {
|
|
370
|
+
"input": "",
|
|
371
|
+
"language": "zh-cn",
|
|
372
|
+
"maxDiffChars": 150000,
|
|
373
|
+
"structure": "subjectOnly",
|
|
374
|
+
"autoGenerate": true,
|
|
375
|
+
"hybridGenerate": false,
|
|
376
|
+
"skill": {
|
|
377
|
+
"id": "conventional",
|
|
378
|
+
"path": "",
|
|
379
|
+
"promptTuning": "Prefer the feat type for user-visible behavior changes when it still matches the staged diff."
|
|
380
|
+
},
|
|
381
|
+
"validation": {
|
|
382
|
+
"protocol": "none",
|
|
383
|
+
"pattern": "",
|
|
384
|
+
"extractTicketIdFromBranch": true,
|
|
385
|
+
"requireTicketIdInMessage": false
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
"git": {
|
|
389
|
+
"autoStageWhenNothingStaged": true,
|
|
390
|
+
"autoCommit": true,
|
|
391
|
+
"autoPush": true,
|
|
392
|
+
"pushTimeoutMs": 180000
|
|
393
|
+
},
|
|
394
|
+
"passHistory": {
|
|
395
|
+
"enabled": true,
|
|
396
|
+
"writeStage": "review_passed",
|
|
397
|
+
"dirPath": ".smart-commit-cli",
|
|
398
|
+
"maxEntries": 3000
|
|
399
|
+
},
|
|
400
|
+
"reporting": {
|
|
401
|
+
"language": "zh-cn",
|
|
402
|
+
"weekStartsOn": "monday",
|
|
403
|
+
"outputDirPath": ".smart-commit-cli/reports",
|
|
404
|
+
"maxInputChars": 200000,
|
|
405
|
+
"prompt": "",
|
|
406
|
+
"ai": {
|
|
407
|
+
"enabled": false
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
"stagedChangeSummary": {
|
|
411
|
+
"enabled": false,
|
|
412
|
+
"language": "zh-cn",
|
|
413
|
+
"maxDiffChars": 200000,
|
|
414
|
+
"outputDirPath": ".smart-commit-cli/staged-change-summaries",
|
|
415
|
+
"prompt": ""
|
|
416
|
+
},
|
|
417
|
+
"pullRequest": {
|
|
418
|
+
"autoCreateAfterPush": false,
|
|
419
|
+
"targetBranch": "",
|
|
420
|
+
"provider": "auto",
|
|
421
|
+
"apiBaseUrl": "",
|
|
422
|
+
"titlePrompt": "",
|
|
423
|
+
"descriptionPrompt": "",
|
|
424
|
+
"maxDiffChars": 200000,
|
|
425
|
+
"assignees": [],
|
|
426
|
+
"reviewers": [],
|
|
427
|
+
"labels": [],
|
|
428
|
+
"milestone": "",
|
|
429
|
+
"draft": false,
|
|
430
|
+
"removeSourceBranch": false,
|
|
431
|
+
"skipBranches": ["main", "master", "develop"],
|
|
432
|
+
"authToken": "env:SMART_COMMIT_PULL_REQUEST_AUTH_TOKEN"
|
|
433
|
+
},
|
|
434
|
+
"output": {
|
|
435
|
+
"format": "json",
|
|
436
|
+
"logLevel": "info"
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
```
|
|
441
|
+
|
|
332
442
|
## Choose The Right Command
|
|
333
443
|
|
|
334
444
|
Instead of memorizing every command, use this section by intent.
|
|
@@ -576,75 +686,233 @@ Canonical format:
|
|
|
576
686
|
- `smartCommitCli` is the recommended long-term format
|
|
577
687
|
- legacy `smartCommit.*` is still accepted for migration
|
|
578
688
|
|
|
579
|
-
##
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
```bash
|
|
584
|
-
--repo
|
|
585
|
-
--config
|
|
586
|
-
--output
|
|
587
|
-
--
|
|
588
|
-
--
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
--
|
|
597
|
-
--
|
|
598
|
-
--
|
|
599
|
-
--
|
|
600
|
-
--
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
--
|
|
607
|
-
--
|
|
689
|
+
## CLI Flags Reference
|
|
690
|
+
|
|
691
|
+
Runtime and output:
|
|
692
|
+
|
|
693
|
+
```bash
|
|
694
|
+
--repo <path>
|
|
695
|
+
--config <path>
|
|
696
|
+
--output <json|text>
|
|
697
|
+
--log-level <debug|info|warn|error>
|
|
698
|
+
--dry-run
|
|
699
|
+
```
|
|
700
|
+
|
|
701
|
+
`--dry-run` is used by `bridge` preflight and `pull-request create`; it is not a config field.
|
|
702
|
+
|
|
703
|
+
Connection:
|
|
704
|
+
|
|
705
|
+
```bash
|
|
706
|
+
--base-url <url>
|
|
707
|
+
--api-key <key>
|
|
708
|
+
--model <model-id>
|
|
709
|
+
--request-timeout-ms <number>
|
|
710
|
+
--llm-response-correction-retry-count <0-10>
|
|
711
|
+
```
|
|
712
|
+
|
|
713
|
+
Review:
|
|
714
|
+
|
|
715
|
+
```bash
|
|
716
|
+
--threshold <number>
|
|
717
|
+
--review-max-diff-chars <number>
|
|
718
|
+
--review-language <zh-cn|zh-tw|en|...>
|
|
719
|
+
--code-review-skill-id <skill-id>
|
|
720
|
+
--code-review-skill-path <path>
|
|
721
|
+
--code-review-skill-prompt-tuning <text>
|
|
722
|
+
```
|
|
723
|
+
|
|
724
|
+
Commit message:
|
|
725
|
+
|
|
726
|
+
```bash
|
|
727
|
+
--commit-message <text>
|
|
728
|
+
--commit-language <zh-cn|zh-tw|en|...>
|
|
729
|
+
--commit-message-max-diff-chars <number>
|
|
730
|
+
--commit-message-structure <subjectOnly|subjectBody|subjectBodyFooter>
|
|
731
|
+
--auto-generate-commit-message <true|false>
|
|
732
|
+
--hybrid-generate-commit-message <true|false>
|
|
733
|
+
--validation-protocol <none|conventional|semantic|gitmoji>
|
|
734
|
+
--validation-pattern <regex>
|
|
735
|
+
--extract-ticket-id-from-branch <true|false>
|
|
736
|
+
--require-ticket-id <true|false>
|
|
737
|
+
--commit-skill-id <skill-id>
|
|
738
|
+
--commit-skill-path <path>
|
|
739
|
+
--commit-skill-prompt-tuning <text>
|
|
740
|
+
```
|
|
741
|
+
|
|
742
|
+
Git:
|
|
743
|
+
|
|
744
|
+
```bash
|
|
745
|
+
--auto-stage
|
|
746
|
+
--no-auto-stage
|
|
747
|
+
--auto-commit
|
|
608
748
|
--no-commit
|
|
749
|
+
--auto-push
|
|
609
750
|
--no-push
|
|
610
|
-
--
|
|
751
|
+
--push-timeout-ms <number>
|
|
752
|
+
```
|
|
753
|
+
|
|
754
|
+
Pass history:
|
|
755
|
+
|
|
756
|
+
```bash
|
|
757
|
+
--enable-pass-history <true|false>
|
|
758
|
+
--pass-history-write-stage <review_passed|commit_completed|commit_push_completed>
|
|
759
|
+
--pass-history-dir <path>
|
|
760
|
+
--pass-history-max-entries <number>
|
|
611
761
|
```
|
|
612
762
|
|
|
613
|
-
|
|
763
|
+
Reporting:
|
|
614
764
|
|
|
615
765
|
```bash
|
|
616
|
-
--period
|
|
617
|
-
--report-language
|
|
618
|
-
--report-
|
|
766
|
+
--period <daily|yesterday|weekly|last-week|monthly|last-month|quarterly|last-quarter|yearly>
|
|
767
|
+
--report-language <zh-cn|zh-tw|en|...>
|
|
768
|
+
--report-week-starts-on <monday|sunday>
|
|
769
|
+
--report-output-dir <path>
|
|
770
|
+
--report-max-input-chars <number>
|
|
771
|
+
--report-prompt <text>
|
|
619
772
|
--report-ai
|
|
773
|
+
--no-report-ai
|
|
620
774
|
```
|
|
621
775
|
|
|
622
|
-
|
|
776
|
+
`--period` belongs to `report generate`; it is not a global config override for `bridge`.
|
|
623
777
|
|
|
624
|
-
|
|
778
|
+
Staged change summary:
|
|
779
|
+
|
|
780
|
+
```bash
|
|
781
|
+
--enable-staged-change-summary <true|false>
|
|
782
|
+
--staged-change-summary-language <zh-cn|zh-tw|en|...>
|
|
783
|
+
--staged-change-summary-max-diff-chars <number>
|
|
784
|
+
--staged-change-summary-output-dir <path>
|
|
785
|
+
--staged-change-summary-prompt <text>
|
|
786
|
+
```
|
|
787
|
+
|
|
788
|
+
Pull request / merge request:
|
|
789
|
+
|
|
790
|
+
```bash
|
|
791
|
+
--auto-create-pull-request-after-push <true|false>
|
|
792
|
+
--target-branch <branch>
|
|
793
|
+
--pull-request-target-branch <branch>
|
|
794
|
+
--provider <auto|github|gitlab>
|
|
795
|
+
--pull-request-provider <auto|github|gitlab>
|
|
796
|
+
--api-base-url <url>
|
|
797
|
+
--pull-request-api-base-url <url>
|
|
798
|
+
--auth-token <token>
|
|
799
|
+
--pull-request-auth-token <token>
|
|
800
|
+
--pull-request-title-prompt <text>
|
|
801
|
+
--pull-request-description-prompt <text>
|
|
802
|
+
--pull-request-max-diff-chars <number>
|
|
803
|
+
--assignee <user>
|
|
804
|
+
--pull-request-assignee <user>
|
|
805
|
+
--reviewer <user-or-team>
|
|
806
|
+
--pull-request-reviewer <user-or-team>
|
|
807
|
+
--label <label>
|
|
808
|
+
--pull-request-label <label>
|
|
809
|
+
--milestone <milestone>
|
|
810
|
+
--pull-request-milestone <milestone>
|
|
811
|
+
--draft <true|false>
|
|
812
|
+
--pull-request-draft <true|false>
|
|
813
|
+
--remove-source-branch <true|false>
|
|
814
|
+
--pull-request-remove-source-branch <true|false>
|
|
815
|
+
--skip-branch <branch>
|
|
816
|
+
--pull-request-skip-branch <branch>
|
|
817
|
+
```
|
|
818
|
+
|
|
819
|
+
Repeat `--assignee`, `--reviewer`, `--label`, or `--skip-branch` to pass multiple values.
|
|
820
|
+
|
|
821
|
+
## Environment Variables Reference
|
|
822
|
+
|
|
823
|
+
Boolean environment variables accept `true`, `false`, `1`, or `0`. Pull request array variables use comma-separated values. Secrets such as API keys and PR/MR auth tokens are redacted from config output and error text.
|
|
824
|
+
|
|
825
|
+
Connection and output:
|
|
625
826
|
|
|
626
827
|
```bash
|
|
627
|
-
SMART_COMMIT_API_KEY
|
|
628
828
|
SMART_COMMIT_BASE_URL
|
|
829
|
+
SMART_COMMIT_API_KEY
|
|
629
830
|
SMART_COMMIT_MODEL
|
|
630
|
-
|
|
831
|
+
SMART_COMMIT_REQUEST_TIMEOUT_MS
|
|
631
832
|
SMART_COMMIT_LLM_RESPONSE_CORRECTION_RETRY_COUNT
|
|
833
|
+
SMART_COMMIT_OUTPUT_FORMAT
|
|
834
|
+
SMART_COMMIT_LOG_LEVEL
|
|
835
|
+
```
|
|
836
|
+
|
|
837
|
+
Review:
|
|
838
|
+
|
|
839
|
+
```bash
|
|
840
|
+
SMART_COMMIT_THRESHOLD
|
|
632
841
|
SMART_COMMIT_REVIEW_LANGUAGE
|
|
842
|
+
SMART_COMMIT_REVIEW_MAX_DIFF_CHARS
|
|
633
843
|
SMART_COMMIT_CODE_REVIEW_SKILL_ID
|
|
844
|
+
SMART_COMMIT_CODE_REVIEW_SKILL_PATH
|
|
845
|
+
SMART_COMMIT_CODE_REVIEW_SKILL_PROMPT_TUNING
|
|
846
|
+
```
|
|
847
|
+
|
|
848
|
+
Commit message:
|
|
849
|
+
|
|
850
|
+
```bash
|
|
634
851
|
SMART_COMMIT_COMMIT_LANGUAGE
|
|
635
852
|
SMART_COMMIT_COMMIT_MESSAGE_STRUCTURE
|
|
853
|
+
SMART_COMMIT_COMMIT_MESSAGE_MAX_DIFF_CHARS
|
|
854
|
+
SMART_COMMIT_AUTO_GENERATE_COMMIT_MESSAGE
|
|
855
|
+
SMART_COMMIT_HYBRID_GENERATE_COMMIT_MESSAGE
|
|
856
|
+
SMART_COMMIT_VALIDATION_PROTOCOL
|
|
857
|
+
SMART_COMMIT_VALIDATION_PATTERN
|
|
858
|
+
SMART_COMMIT_EXTRACT_TICKET_ID_FROM_BRANCH
|
|
859
|
+
SMART_COMMIT_REQUIRE_TICKET_ID
|
|
860
|
+
SMART_COMMIT_COMMIT_SKILL_ID
|
|
861
|
+
SMART_COMMIT_COMMIT_SKILL_PATH
|
|
862
|
+
SMART_COMMIT_COMMIT_SKILL_PROMPT_TUNING
|
|
863
|
+
```
|
|
864
|
+
|
|
865
|
+
Git and pass history:
|
|
866
|
+
|
|
867
|
+
```bash
|
|
868
|
+
SMART_COMMIT_AUTO_STAGE
|
|
636
869
|
SMART_COMMIT_AUTO_COMMIT
|
|
637
870
|
SMART_COMMIT_AUTO_PUSH
|
|
871
|
+
SMART_COMMIT_PUSH_TIMEOUT_MS
|
|
872
|
+
SMART_COMMIT_ENABLE_PASS_HISTORY
|
|
638
873
|
SMART_COMMIT_PASS_HISTORY_WRITE_STAGE
|
|
874
|
+
SMART_COMMIT_PASS_HISTORY_DIR
|
|
875
|
+
SMART_COMMIT_PASS_HISTORY_MAX_ENTRIES
|
|
876
|
+
```
|
|
877
|
+
|
|
878
|
+
Reporting:
|
|
879
|
+
|
|
880
|
+
```bash
|
|
639
881
|
SMART_COMMIT_REPORT_LANGUAGE
|
|
882
|
+
SMART_COMMIT_REPORT_WEEK_STARTS_ON
|
|
640
883
|
SMART_COMMIT_REPORT_OUTPUT_DIR
|
|
884
|
+
SMART_COMMIT_REPORT_MAX_INPUT_CHARS
|
|
885
|
+
SMART_COMMIT_REPORT_PROMPT
|
|
886
|
+
SMART_COMMIT_REPORT_USE_AI
|
|
887
|
+
```
|
|
888
|
+
|
|
889
|
+
Staged change summary:
|
|
890
|
+
|
|
891
|
+
```bash
|
|
641
892
|
SMART_COMMIT_ENABLE_STAGED_CHANGE_SUMMARY
|
|
642
893
|
SMART_COMMIT_STAGED_CHANGE_SUMMARY_LANGUAGE
|
|
894
|
+
SMART_COMMIT_STAGED_CHANGE_SUMMARY_MAX_DIFF_CHARS
|
|
643
895
|
SMART_COMMIT_STAGED_CHANGE_SUMMARY_OUTPUT_DIR
|
|
644
896
|
SMART_COMMIT_STAGED_CHANGE_SUMMARY_PROMPT
|
|
897
|
+
```
|
|
898
|
+
|
|
899
|
+
Pull request / merge request:
|
|
900
|
+
|
|
901
|
+
```bash
|
|
645
902
|
SMART_COMMIT_AUTO_CREATE_PULL_REQUEST_AFTER_PUSH
|
|
646
903
|
SMART_COMMIT_PULL_REQUEST_TARGET_BRANCH
|
|
647
904
|
SMART_COMMIT_PULL_REQUEST_PROVIDER
|
|
905
|
+
SMART_COMMIT_PULL_REQUEST_API_BASE_URL
|
|
906
|
+
SMART_COMMIT_PULL_REQUEST_TITLE_PROMPT
|
|
907
|
+
SMART_COMMIT_PULL_REQUEST_DESCRIPTION_PROMPT
|
|
908
|
+
SMART_COMMIT_PULL_REQUEST_MAX_DIFF_CHARS
|
|
909
|
+
SMART_COMMIT_PULL_REQUEST_ASSIGNEES
|
|
910
|
+
SMART_COMMIT_PULL_REQUEST_REVIEWERS
|
|
911
|
+
SMART_COMMIT_PULL_REQUEST_LABELS
|
|
912
|
+
SMART_COMMIT_PULL_REQUEST_MILESTONE
|
|
913
|
+
SMART_COMMIT_PULL_REQUEST_DRAFT
|
|
914
|
+
SMART_COMMIT_PULL_REQUEST_REMOVE_SOURCE_BRANCH
|
|
915
|
+
SMART_COMMIT_PULL_REQUEST_SKIP_BRANCHES
|
|
648
916
|
SMART_COMMIT_PULL_REQUEST_AUTH_TOKEN
|
|
649
917
|
```
|
|
650
918
|
|
package/docs/publish.md
CHANGED
|
@@ -21,7 +21,7 @@ Current package name:
|
|
|
21
21
|
3. Run `npm run pack:dry-run`
|
|
22
22
|
4. Review [`CHANGELOG.md`](../CHANGELOG.md)
|
|
23
23
|
5. Review [`docs/release-checklist.md`](./release-checklist.md)
|
|
24
|
-
6. Review the matching release draft in [`docs/releases/0.1.
|
|
24
|
+
6. Review the matching release draft in [`docs/releases/0.1.11-draft.md`](./releases/0.1.11-draft.md)
|
|
25
25
|
|
|
26
26
|
## Recommended Release Order
|
|
27
27
|
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# `smart-commit-copilot-cli` 0.1.10 Draft Release Notes
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
`smart-commit-copilot-cli` 0.1.10 improves the interactive experience for long-running commands and completes async routing for pull-request creation.
|
|
6
|
+
|
|
7
|
+
This release focuses on making `bridge`, `report generate`, and `pull-request create` feel responsive in terminals, and on surfacing clearer PR/MR status logs during create and bridge auto-create flows.
|
|
8
|
+
|
|
9
|
+
## Highlights
|
|
10
|
+
|
|
11
|
+
- async CLI entry now includes `pull-request create`, matching `bridge` and `report generate`
|
|
12
|
+
- TTY spinner feedback on stderr while async commands are running
|
|
13
|
+
- structured `[PR][INFO]` and `[PR][WARN]` logs for created, existing, dry-run, and failed PR/MR outcomes
|
|
14
|
+
|
|
15
|
+
## Why This Release Matters
|
|
16
|
+
|
|
17
|
+
This version closes a routing gap introduced in `0.1.8` and improves day-to-day terminal UX:
|
|
18
|
+
|
|
19
|
+
- `pull-request create` now uses the same async execution path as other network-backed commands instead of failing through the synchronous dispatcher
|
|
20
|
+
- operators get visible progress in interactive terminals without polluting JSON stdout output
|
|
21
|
+
- PR/MR creation results are easier to scan in logs and automation transcripts
|
|
22
|
+
|
|
23
|
+
## Notable Behavior Updates
|
|
24
|
+
|
|
25
|
+
### Async command routing
|
|
26
|
+
|
|
27
|
+
- `cli.ts` now treats `pull-request create` as an async command alongside `bridge` and `report generate`
|
|
28
|
+
- synchronous `runCli` continues to reject async-only commands with an explicit error, preserving the existing contract boundary
|
|
29
|
+
|
|
30
|
+
### TTY spinner
|
|
31
|
+
|
|
32
|
+
- when stderr is a TTY, the CLI shows a lightweight spinner while async commands run
|
|
33
|
+
- spinner messages are command-specific, for example `smart-commit bridge running...`
|
|
34
|
+
- non-TTY streams skip spinner output so JSON and piped automation flows stay clean
|
|
35
|
+
|
|
36
|
+
### PR/MR logging
|
|
37
|
+
|
|
38
|
+
- `pull-request create` emits `[PR][INFO]` lines for `created`, `existing`, and dry-run `ready` outcomes
|
|
39
|
+
- bridge auto-create emits matching `[PR][INFO]` and `[PR][WARN]` lines through a shared formatter
|
|
40
|
+
- GitLab merge requests use `merge request` wording; GitHub uses `pull request`
|
|
41
|
+
|
|
42
|
+
## Verification Coverage Added Or Strengthened
|
|
43
|
+
|
|
44
|
+
The project now has stronger regression protection for:
|
|
45
|
+
|
|
46
|
+
1. spinner rendering and clearing on TTY streams, with no writes on non-TTY streams
|
|
47
|
+
2. pull-request create info and warning log formatting across created, existing, and dry-run states
|
|
48
|
+
3. bridge pull-request creation log formatting for created, existing, error, and warning paths
|
|
49
|
+
|
|
50
|
+
## Suggested Upgrade Path
|
|
51
|
+
|
|
52
|
+
1. update to `0.1.10`
|
|
53
|
+
2. run `npm test`
|
|
54
|
+
3. run `npm run smoke:test`
|
|
55
|
+
4. run `npm run pack:dry-run`
|
|
56
|
+
5. publish only after all three checks pass
|
|
57
|
+
|
|
58
|
+
## Known Follow-Up Areas
|
|
59
|
+
|
|
60
|
+
- optional `--no-spinner` flag if teams need to disable TTY feedback in scripted interactive shells
|
|
61
|
+
- broader real-provider validation for pull-request create logging in CI environments that mix TTY and non-TTY stderr
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# `smart-commit-copilot-cli` 0.1.11 Draft Release Notes
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
`smart-commit-copilot-cli` 0.1.11 is a documentation alignment release for the standalone CLI.
|
|
6
|
+
|
|
7
|
+
This release focuses on making the README and example config reflect the full current command surface, including staged change summaries, PR/MR workflows, and the expanded configuration and flag reference.
|
|
8
|
+
|
|
9
|
+
## Highlights
|
|
10
|
+
|
|
11
|
+
- README now covers staged change summaries, PR/MR auto-create, standalone `pull-request create`, and optional follow-up commands
|
|
12
|
+
- `bridge` workflow is documented with a step table instead of a high-level diagram only
|
|
13
|
+
- full inline `smartCommitCli` config example plus grouped CLI flag and environment variable references
|
|
14
|
+
- example config aligned with the README, including `extraHeaders`, `requestTimeoutMs`, and sample `promptTuning` values
|
|
15
|
+
|
|
16
|
+
## Why This Release Matters
|
|
17
|
+
|
|
18
|
+
This version improves onboarding and day-to-day reference quality without changing runtime behavior:
|
|
19
|
+
|
|
20
|
+
- new users can see the full `bridge` side-effect path in one place
|
|
21
|
+
- operators configuring PR/MR or staged summaries have matching README, example config, and flag/env docs
|
|
22
|
+
- maintainers have a release draft aligned with the `0.1.11` publish target
|
|
23
|
+
|
|
24
|
+
## Notable Documentation Updates
|
|
25
|
+
|
|
26
|
+
### README
|
|
27
|
+
|
|
28
|
+
- introduction and capability list now include staged change summaries and PR/MR creation
|
|
29
|
+
- typical `bridge` run documented as a step table with triggers and side effects
|
|
30
|
+
- full configuration example embedded for learning the complete `smartCommitCli` surface
|
|
31
|
+
- CLI flags and environment variables reorganized into topical reference sections
|
|
32
|
+
|
|
33
|
+
### Example config
|
|
34
|
+
|
|
35
|
+
- `examples/config/smart-commit.json` now mirrors the README full example for connection headers, timeouts, and prompt tuning samples
|
|
36
|
+
|
|
37
|
+
### Publish guide
|
|
38
|
+
|
|
39
|
+
- the pre-publish checklist now points at the `0.1.11` draft
|
|
40
|
+
|
|
41
|
+
## Suggested Upgrade Path
|
|
42
|
+
|
|
43
|
+
1. update to `0.1.11`
|
|
44
|
+
2. run `npm test`
|
|
45
|
+
3. run `npm run smoke:test`
|
|
46
|
+
4. run `npm run pack:dry-run`
|
|
47
|
+
5. publish only after all three checks pass
|
|
48
|
+
|
|
49
|
+
## Known Follow-Up Areas
|
|
50
|
+
|
|
51
|
+
- optional README link validation from published tarball surfaces after npm release
|
|
52
|
+
- consider a dedicated configuration reference page if the inline README example grows further
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
"baseUrl": "https://api.openai.com/v1",
|
|
5
5
|
"apiKey": "env:SMART_COMMIT_API_KEY",
|
|
6
6
|
"model": "gpt-5",
|
|
7
|
+
"extraHeaders": {
|
|
8
|
+
"X-Client": "smart-commit-cli"
|
|
9
|
+
},
|
|
10
|
+
"requestTimeoutMs": 1000000,
|
|
7
11
|
"llmResponseCorrectionRetryCount": 3
|
|
8
12
|
},
|
|
9
13
|
"review": {
|
|
@@ -13,7 +17,7 @@
|
|
|
13
17
|
"skill": {
|
|
14
18
|
"id": "code-review",
|
|
15
19
|
"path": "",
|
|
16
|
-
"promptTuning": ""
|
|
20
|
+
"promptTuning": "Ignore findings that only complain about the project's required logging wrapper."
|
|
17
21
|
}
|
|
18
22
|
},
|
|
19
23
|
"commitMessage": {
|
|
@@ -26,7 +30,7 @@
|
|
|
26
30
|
"skill": {
|
|
27
31
|
"id": "conventional",
|
|
28
32
|
"path": "",
|
|
29
|
-
"promptTuning": ""
|
|
33
|
+
"promptTuning": "Prefer the feat type for user-visible behavior changes when it still matches the staged diff."
|
|
30
34
|
},
|
|
31
35
|
"validation": {
|
|
32
36
|
"protocol": "none",
|
package/out/cli.js
CHANGED
|
@@ -2,11 +2,19 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
const cliApp_1 = require("./cliApp");
|
|
5
|
+
const spinner_1 = require("./spinner");
|
|
5
6
|
async function main() {
|
|
6
7
|
const argv = process.argv.slice(2);
|
|
7
8
|
const command = (0, cliApp_1.parseCliCommand)(argv).kind;
|
|
8
|
-
const useAsync = command === "bridge" || command === "report-generate";
|
|
9
|
-
const
|
|
9
|
+
const useAsync = command === "bridge" || command === "report-generate" || command === "pull-request-create";
|
|
10
|
+
const spinner = useAsync ? (0, spinner_1.startSpinner)(formatSpinnerMessage(command), process.stderr) : undefined;
|
|
11
|
+
let result;
|
|
12
|
+
try {
|
|
13
|
+
result = useAsync ? await (0, cliApp_1.runCliAsync)(argv, process.env) : (0, cliApp_1.runCli)(argv, process.env);
|
|
14
|
+
}
|
|
15
|
+
finally {
|
|
16
|
+
spinner?.stop();
|
|
17
|
+
}
|
|
10
18
|
if (result.stdout) {
|
|
11
19
|
process.stdout.write(result.stdout);
|
|
12
20
|
}
|
|
@@ -16,4 +24,16 @@ async function main() {
|
|
|
16
24
|
process.exitCode = result.exitCode;
|
|
17
25
|
}
|
|
18
26
|
void main();
|
|
27
|
+
function formatSpinnerMessage(command) {
|
|
28
|
+
if (command === "bridge") {
|
|
29
|
+
return "smart-commit bridge running...";
|
|
30
|
+
}
|
|
31
|
+
if (command === "pull-request-create") {
|
|
32
|
+
return "smart-commit pull-request create running...";
|
|
33
|
+
}
|
|
34
|
+
if (command === "report-generate") {
|
|
35
|
+
return "smart-commit report generate running...";
|
|
36
|
+
}
|
|
37
|
+
return "smart-commit running...";
|
|
38
|
+
}
|
|
19
39
|
//# sourceMappingURL=cli.js.map
|
package/out/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AAEA,qCAAgE;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AAEA,qCAAgE;AAChE,uCAAyC;AAEzC,KAAK,UAAU,IAAI;IACjB,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnC,MAAM,OAAO,GAAG,IAAA,wBAAe,EAAC,IAAI,CAAC,CAAC,IAAI,CAAC;IAC3C,MAAM,QAAQ,GAAG,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,iBAAiB,IAAI,OAAO,KAAK,qBAAqB,CAAC;IAC5G,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAA,sBAAY,EAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACnG,IAAI,MAAM,CAAC;IACX,IAAI,CAAC;QACH,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,IAAA,oBAAW,EAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAA,eAAM,EAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IACvF,CAAC;YAAS,CAAC;QACT,OAAO,EAAE,IAAI,EAAE,CAAC;IAClB,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAClB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAClB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AACrC,CAAC;AAED,KAAK,IAAI,EAAE,CAAC;AAEZ,SAAS,oBAAoB,CAAC,OAAmD;IAC/E,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;QACzB,OAAO,gCAAgC,CAAC;IAC1C,CAAC;IACD,IAAI,OAAO,KAAK,qBAAqB,EAAE,CAAC;QACtC,OAAO,6CAA6C,CAAC;IACvD,CAAC;IACD,IAAI,OAAO,KAAK,iBAAiB,EAAE,CAAC;QAClC,OAAO,yCAAyC,CAAC;IACnD,CAAC;IAED,OAAO,yBAAyB,CAAC;AACnC,CAAC"}
|
package/out/cliApp.js
CHANGED
|
@@ -113,9 +113,7 @@ async function runCliAsync(argv, env = process.env) {
|
|
|
113
113
|
const result = await (0, pullRequest_1.runPullRequestCreateCommand)(command.flags, env);
|
|
114
114
|
const outputFormat = (0, renderOutput_1.resolveRequestedOutputFormat)(command.flags, env, result.payload.config.output.format);
|
|
115
115
|
let stderr = "";
|
|
116
|
-
|
|
117
|
-
stderr += result.payload.warnings.map((warning) => (0, logger_1.formatLogLine)("warn", warning)).join("");
|
|
118
|
-
}
|
|
116
|
+
stderr += formatPullRequestCreateLogs(result.payload);
|
|
119
117
|
if (result.payload.status === "error" && result.payload.error) {
|
|
120
118
|
stderr += `${result.payload.error.message}\n`;
|
|
121
119
|
}
|
|
@@ -131,9 +129,7 @@ async function runCliAsync(argv, env = process.env) {
|
|
|
131
129
|
if (result.payload.stagedChangeSummary.error && (0, logger_1.shouldLog)(result.payload.config.output.logLevel, "warn")) {
|
|
132
130
|
stderr += (0, logger_1.formatLogLine)("warn", `Staged change summary generation failed: ${result.payload.stagedChangeSummary.error}`);
|
|
133
131
|
}
|
|
134
|
-
|
|
135
|
-
stderr += (0, logger_1.formatLogLine)("warn", `Pull request creation failed: ${result.payload.pullRequestCreation.error}`);
|
|
136
|
-
}
|
|
132
|
+
stderr += formatBridgePullRequestCreationLogs(result.payload.pullRequestCreation, result.payload.config.output.logLevel);
|
|
137
133
|
if ((0, logger_1.shouldLog)(result.payload.config.output.logLevel, "debug")) {
|
|
138
134
|
stderr += (0, logger_1.formatLogLine)("debug", `bridge completed with status=${result.payload.status}, phase=${result.payload.phase}, output=${outputFormat}.`);
|
|
139
135
|
}
|
|
@@ -155,6 +151,51 @@ async function runCliAsync(argv, env = process.env) {
|
|
|
155
151
|
};
|
|
156
152
|
}
|
|
157
153
|
}
|
|
154
|
+
function formatPullRequestCreateLogs(payload) {
|
|
155
|
+
const logLevel = payload.config.output.logLevel;
|
|
156
|
+
let stderr = "";
|
|
157
|
+
if (payload.status === "created" && (0, logger_1.shouldLog)(logLevel, "info")) {
|
|
158
|
+
stderr += (0, logger_1.formatLogLine)("info", `[PR][INFO] Created ${formatPullRequestKind(payload.platform)} from ${payload.sourceBranch ?? "(unknown)"} to ${payload.targetBranch ?? "(unknown)"}: ${payload.url ?? "(no url returned)"}`);
|
|
159
|
+
}
|
|
160
|
+
if (payload.status === "existing" && (0, logger_1.shouldLog)(logLevel, "info")) {
|
|
161
|
+
stderr += (0, logger_1.formatLogLine)("info", `[PR][INFO] Open ${formatPullRequestKind(payload.platform)} already exists for ${payload.sourceBranch ?? "(unknown)"} -> ${payload.targetBranch ?? "(unknown)"}. Skipping creation.`);
|
|
162
|
+
if (payload.title || payload.url) {
|
|
163
|
+
stderr += (0, logger_1.formatLogLine)("info", `[PR][INFO] Existing: ${payload.title ?? "(untitled)"} - ${payload.url ?? "(no url returned)"}`);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
if (payload.status === "ready" && (0, logger_1.shouldLog)(logLevel, "info")) {
|
|
167
|
+
stderr += (0, logger_1.formatLogLine)("info", `[PR][INFO] ${formatPullRequestKind(payload.platform)} content is ready for ${payload.sourceBranch ?? "(unknown)"} -> ${payload.targetBranch ?? "(unknown)"}; dry-run did not create it.`);
|
|
168
|
+
}
|
|
169
|
+
if (payload.warnings.length > 0 && (0, logger_1.shouldLog)(logLevel, "warn")) {
|
|
170
|
+
stderr += payload.warnings.map((warning) => (0, logger_1.formatLogLine)("warn", `[PR][WARN] ${warning}`)).join("");
|
|
171
|
+
}
|
|
172
|
+
return stderr;
|
|
173
|
+
}
|
|
174
|
+
function formatBridgePullRequestCreationLogs(payload, logLevel) {
|
|
175
|
+
let stderr = "";
|
|
176
|
+
if (!payload.enabled || payload.status === "skipped") {
|
|
177
|
+
return stderr;
|
|
178
|
+
}
|
|
179
|
+
if (payload.status === "created" && (0, logger_1.shouldLog)(logLevel, "info")) {
|
|
180
|
+
stderr += (0, logger_1.formatLogLine)("info", `[PR][INFO] Created ${formatPullRequestKind(payload.platform)} from ${payload.sourceBranch ?? "(unknown)"} to ${payload.targetBranch ?? "(unknown)"}: ${payload.url ?? "(no url returned)"}`);
|
|
181
|
+
}
|
|
182
|
+
if (payload.status === "existing" && (0, logger_1.shouldLog)(logLevel, "info")) {
|
|
183
|
+
stderr += (0, logger_1.formatLogLine)("info", `[PR][INFO] Open ${formatPullRequestKind(payload.platform)} already exists for ${payload.sourceBranch ?? "(unknown)"} -> ${payload.targetBranch ?? "(unknown)"}. Skipping creation.`);
|
|
184
|
+
if (payload.title || payload.url) {
|
|
185
|
+
stderr += (0, logger_1.formatLogLine)("info", `[PR][INFO] Existing: ${payload.title ?? "(untitled)"} - ${payload.url ?? "(no url returned)"}`);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
if (payload.status === "error" && payload.error && (0, logger_1.shouldLog)(logLevel, "warn")) {
|
|
189
|
+
stderr += (0, logger_1.formatLogLine)("warn", `[PR][WARN] Pull request creation failed: ${payload.error}`);
|
|
190
|
+
}
|
|
191
|
+
if (payload.warnings.length > 0 && (0, logger_1.shouldLog)(logLevel, "warn")) {
|
|
192
|
+
stderr += payload.warnings.map((warning) => (0, logger_1.formatLogLine)("warn", `[PR][WARN] ${warning}`)).join("");
|
|
193
|
+
}
|
|
194
|
+
return stderr;
|
|
195
|
+
}
|
|
196
|
+
function formatPullRequestKind(platform) {
|
|
197
|
+
return platform === "gitlab" ? "merge request" : "pull request";
|
|
198
|
+
}
|
|
158
199
|
function parseCommand(argv) {
|
|
159
200
|
const positional = argv.filter((token) => !token.startsWith("--"));
|
|
160
201
|
if ((argv.length === 1 && (argv[0] === "--version" || argv[0] === "-v")) ||
|
package/out/cliApp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cliApp.js","sourceRoot":"","sources":["../src/cliApp.ts"],"names":[],"mappings":";;AA2BA,wBA8EC;AAED,kCAkGC;AAwED,0CAEC;AAvRD,8CAA6E;AAC7E,wDAAqE;AACrE,8CAA6D;AAC7D,qCAA4C;AAC5C,2CAIqB;AACrB,qCAAoD;AACpD,qCAA2C;AAC3C,iDAMwB;AAExB,MAAM,gCAAgC,GAAI,OAAO,CAAC,iBAAiB,CAA0B,CAAC,OAAO,IAAI,OAAO,CAAC;AA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AAW,CAAC,MAAM,CAAC,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;AAC5D,CAAC;AAED,SAAS,oBAAoB,CAAC,KAAyB;IACrD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC9C,IACE,UAAU,KAAK,aAAa;QAC5B,UAAU,KAAK,gBAAgB;QAC/B,UAAU,KAAK,QAAQ;QACvB,UAAU,KAAK,iBAAiB;QAChC,UAAU,KAAK,qBAAqB,EACpC,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,qGAAqG,CAAC,CAAC;AACzH,CAAC"}
|
package/out/spinner.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.startSpinner = startSpinner;
|
|
4
|
+
const defaultFrames = ["-", "\\", "|", "/"];
|
|
5
|
+
function startSpinner(message, stream, options = {}) {
|
|
6
|
+
if (!stream.isTTY) {
|
|
7
|
+
return noopSpinner;
|
|
8
|
+
}
|
|
9
|
+
const frames = options.frames && options.frames.length > 0 ? options.frames : defaultFrames;
|
|
10
|
+
const intervalMs = options.intervalMs ?? 120;
|
|
11
|
+
const setIntervalFn = options.setIntervalFn ?? setInterval;
|
|
12
|
+
const clearIntervalFn = options.clearIntervalFn ?? clearInterval;
|
|
13
|
+
let frameIndex = 0;
|
|
14
|
+
let stopped = false;
|
|
15
|
+
const render = () => {
|
|
16
|
+
stream.write(`\r${frames[frameIndex % frames.length]} ${message}`);
|
|
17
|
+
frameIndex += 1;
|
|
18
|
+
};
|
|
19
|
+
render();
|
|
20
|
+
const timer = setIntervalFn(render, intervalMs);
|
|
21
|
+
return {
|
|
22
|
+
stop() {
|
|
23
|
+
if (stopped) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
stopped = true;
|
|
27
|
+
clearIntervalFn(timer);
|
|
28
|
+
stream.write("\r\x1b[2K");
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const noopSpinner = {
|
|
33
|
+
stop() {
|
|
34
|
+
// No-op for non-interactive output.
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=spinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.js","sourceRoot":"","sources":["../src/spinner.ts"],"names":[],"mappings":";;AAkBA,oCAmCC;AArCD,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,CAAU,CAAC;AAErD,SAAgB,YAAY,CAC1B,OAAe,EACf,MAAqB,EACrB,UAA0B,EAAE;IAE5B,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAClB,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC;IAC5F,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,GAAG,CAAC;IAC7C,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,WAAW,CAAC;IAC3D,MAAM,eAAe,GAAG,OAAO,CAAC,eAAe,IAAI,aAAa,CAAC;IACjE,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,IAAI,OAAO,GAAG,KAAK,CAAC;IAEpB,MAAM,MAAM,GAAG,GAAS,EAAE;QACxB,MAAM,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,IAA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