geeto 0.1.0 → 0.3.3

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.
Files changed (118) hide show
  1. package/README.md +142 -43
  2. package/lib/api/github.d.ts +91 -0
  3. package/lib/api/github.d.ts.map +1 -0
  4. package/lib/api/github.js +163 -0
  5. package/lib/api/github.js.map +1 -0
  6. package/lib/api/trello.js +1 -1
  7. package/lib/api/trello.js.map +1 -1
  8. package/lib/cli/input.d.ts +1 -0
  9. package/lib/cli/input.d.ts.map +1 -1
  10. package/lib/cli/input.js +349 -0
  11. package/lib/cli/input.js.map +1 -1
  12. package/lib/cli/menu.d.ts +4 -0
  13. package/lib/cli/menu.d.ts.map +1 -1
  14. package/lib/cli/menu.js +452 -31
  15. package/lib/cli/menu.js.map +1 -1
  16. package/lib/core/github-setup.d.ts +8 -0
  17. package/lib/core/github-setup.d.ts.map +1 -0
  18. package/lib/core/github-setup.js +114 -0
  19. package/lib/core/github-setup.js.map +1 -0
  20. package/lib/index.js +291 -29
  21. package/lib/index.js.map +1 -1
  22. package/lib/types/index.d.ts +15 -0
  23. package/lib/types/index.d.ts.map +1 -1
  24. package/lib/utils/branch-naming.js +1 -1
  25. package/lib/utils/branch-naming.js.map +1 -1
  26. package/lib/utils/config.d.ts +17 -1
  27. package/lib/utils/config.d.ts.map +1 -1
  28. package/lib/utils/config.js +53 -1
  29. package/lib/utils/config.js.map +1 -1
  30. package/lib/utils/display.d.ts +20 -0
  31. package/lib/utils/display.d.ts.map +1 -1
  32. package/lib/utils/display.js +84 -21
  33. package/lib/utils/display.js.map +1 -1
  34. package/lib/utils/exec.d.ts +1 -1
  35. package/lib/utils/exec.d.ts.map +1 -1
  36. package/lib/utils/exec.js +2 -2
  37. package/lib/utils/exec.js.map +1 -1
  38. package/lib/utils/git-errors.js +3 -3
  39. package/lib/utils/git-errors.js.map +1 -1
  40. package/lib/utils/git.d.ts +9 -0
  41. package/lib/utils/git.d.ts.map +1 -1
  42. package/lib/utils/git.js +15 -0
  43. package/lib/utils/git.js.map +1 -1
  44. package/lib/utils/logging.d.ts +2 -0
  45. package/lib/utils/logging.d.ts.map +1 -1
  46. package/lib/utils/logging.js +7 -1
  47. package/lib/utils/logging.js.map +1 -1
  48. package/lib/workflows/amend.d.ts +9 -0
  49. package/lib/workflows/amend.d.ts.map +1 -0
  50. package/lib/workflows/amend.js +241 -0
  51. package/lib/workflows/amend.js.map +1 -0
  52. package/lib/workflows/branch.d.ts.map +1 -1
  53. package/lib/workflows/branch.js +2 -1
  54. package/lib/workflows/branch.js.map +1 -1
  55. package/lib/workflows/cherry-pick.d.ts +9 -0
  56. package/lib/workflows/cherry-pick.d.ts.map +1 -0
  57. package/lib/workflows/cherry-pick.js +237 -0
  58. package/lib/workflows/cherry-pick.js.map +1 -0
  59. package/lib/workflows/cleanup.d.ts +1 -1
  60. package/lib/workflows/cleanup.d.ts.map +1 -1
  61. package/lib/workflows/cleanup.js +93 -69
  62. package/lib/workflows/cleanup.js.map +1 -1
  63. package/lib/workflows/commit.d.ts.map +1 -1
  64. package/lib/workflows/commit.js +38 -19
  65. package/lib/workflows/commit.js.map +1 -1
  66. package/lib/workflows/compare.d.ts +9 -0
  67. package/lib/workflows/compare.d.ts.map +1 -0
  68. package/lib/workflows/compare.js +231 -0
  69. package/lib/workflows/compare.js.map +1 -0
  70. package/lib/workflows/history.d.ts +9 -0
  71. package/lib/workflows/history.d.ts.map +1 -0
  72. package/lib/workflows/history.js +194 -0
  73. package/lib/workflows/history.js.map +1 -0
  74. package/lib/workflows/issue.d.ts +9 -0
  75. package/lib/workflows/issue.d.ts.map +1 -0
  76. package/lib/workflows/issue.js +211 -0
  77. package/lib/workflows/issue.js.map +1 -0
  78. package/lib/workflows/main-steps.d.ts.map +1 -1
  79. package/lib/workflows/main-steps.js +12 -10
  80. package/lib/workflows/main-steps.js.map +1 -1
  81. package/lib/workflows/main.d.ts.map +1 -1
  82. package/lib/workflows/main.js +29 -38
  83. package/lib/workflows/main.js.map +1 -1
  84. package/lib/workflows/pr.d.ts +9 -0
  85. package/lib/workflows/pr.d.ts.map +1 -0
  86. package/lib/workflows/pr.js +280 -0
  87. package/lib/workflows/pr.js.map +1 -0
  88. package/lib/workflows/release.d.ts +7 -0
  89. package/lib/workflows/release.d.ts.map +1 -0
  90. package/lib/workflows/release.js +445 -0
  91. package/lib/workflows/release.js.map +1 -0
  92. package/lib/workflows/security-gate.d.ts.map +1 -1
  93. package/lib/workflows/security-gate.js +91 -7
  94. package/lib/workflows/security-gate.js.map +1 -1
  95. package/lib/workflows/settings.d.ts +5 -1
  96. package/lib/workflows/settings.d.ts.map +1 -1
  97. package/lib/workflows/settings.js +62 -3
  98. package/lib/workflows/settings.js.map +1 -1
  99. package/lib/workflows/stash.d.ts +9 -0
  100. package/lib/workflows/stash.d.ts.map +1 -0
  101. package/lib/workflows/stash.js +341 -0
  102. package/lib/workflows/stash.js.map +1 -0
  103. package/lib/workflows/stats.d.ts +9 -0
  104. package/lib/workflows/stats.d.ts.map +1 -0
  105. package/lib/workflows/stats.js +288 -0
  106. package/lib/workflows/stats.js.map +1 -0
  107. package/lib/workflows/switch.d.ts +9 -0
  108. package/lib/workflows/switch.d.ts.map +1 -0
  109. package/lib/workflows/switch.js +154 -0
  110. package/lib/workflows/switch.js.map +1 -0
  111. package/lib/workflows/trello-menu.d.ts.map +1 -1
  112. package/lib/workflows/trello-menu.js +59 -19
  113. package/lib/workflows/trello-menu.js.map +1 -1
  114. package/lib/workflows/undo.d.ts +9 -0
  115. package/lib/workflows/undo.d.ts.map +1 -0
  116. package/lib/workflows/undo.js +464 -0
  117. package/lib/workflows/undo.js.map +1 -0
  118. package/package.json +2 -2
package/README.md CHANGED
@@ -13,16 +13,36 @@ Streamline your Git workflow with intelligent branch naming, commit messages, an
13
13
 
14
14
  ## Features
15
15
 
16
- - **Multiple AI Providers** - Gemini, GitHub Copilot, OpenRouter
17
- - **Smart Branch Naming** - AI-generated branch names from diffs or Trello cards
18
- - **Conventional Commits** - Auto-generated commit messages following best practices
19
- - **Trello Integration** - Link branches to Trello cards, generate task lists for AI agents
20
- - **Checkpoint Recovery** - Resume interrupted workflows from any step
21
- - **Cross-Platform** - macOS, Linux, Windows
16
+ - **Multiple AI Providers** Gemini, GitHub Copilot, OpenRouter
17
+ - **Smart Branch Naming** AI-generated branch names from diffs or Trello cards
18
+ - **Conventional Commits** Auto-generated commit messages following best practices
19
+ - **Inline Editor** — Built-in terminal editor with syntax highlighting (no vim needed)
20
+ - **Release Manager** Semver bumping, CHANGELOG.md, RELEASE.MD, and tagging
21
+ - **Trello Integration** Link branches to Trello cards, generate task lists for AI agents
22
+ - **Git Tools** — Branch cleanup, switcher, compare, cherry-pick, stash, amend, undo, stats, history
23
+ - **GitHub Integration** — Create Pull Requests and Issues from the terminal
24
+ - **Checkpoint Recovery** — Resume interrupted workflows from any step
25
+ - **Cross-Platform** — macOS, Linux, Windows
22
26
 
23
27
  ## Installation
24
28
 
25
- ### NPM/Bun
29
+ ### Homebrew (macOS / Linux)
30
+
31
+ ```bash
32
+ brew tap rust142/geeto
33
+ brew install geeto
34
+ ```
35
+
36
+ ### APT (Debian / Ubuntu)
37
+
38
+ ```bash
39
+ # Download .deb from latest release
40
+ curl -fsSL "https://github.com/rust142/geeto/releases/latest/download/geeto_$(curl -s https://api.github.com/repos/rust142/geeto/releases/latest | grep tag_name | cut -d '"' -f4 | tr -d v)_amd64.deb" -o geeto.deb
41
+ sudo dpkg -i geeto.deb
42
+ rm geeto.deb
43
+ ```
44
+
45
+ ### NPM / Bun
26
46
 
27
47
  ```bash
28
48
  npm install -g geeto
@@ -30,27 +50,49 @@ npm install -g geeto
30
50
  bun install -g geeto
31
51
  ```
32
52
 
53
+ ### Binary (manual)
54
+
55
+ Download the binary for your platform from [Releases](https://github.com/rust142/geeto/releases/latest):
56
+
57
+ | Platform | Binary |
58
+ | ----------- | ------------------- |
59
+ | macOS x64 | `geeto-mac` |
60
+ | macOS ARM | `geeto-mac-arm64` |
61
+ | Linux x64 | `geeto-linux` |
62
+ | Linux ARM | `geeto-linux-arm64` |
63
+ | Windows x64 | `geeto-windows.exe` |
64
+
65
+ ```bash
66
+ # Example: Linux x64
67
+ curl -fsSL https://github.com/rust142/geeto/releases/latest/download/geeto-linux -o geeto
68
+ chmod +x geeto
69
+ sudo mv geeto /usr/local/bin/
70
+ ```
71
+
33
72
  ### From Source
34
73
 
35
74
  ```bash
36
75
  curl -fsSL https://raw.githubusercontent.com/rust142/geeto/main/tools/install.sh | bash -s -- --no-label
37
76
  ```
38
77
 
39
- **Requirements:** Node.js ≥ 18, Bun ≥ 1.0, Git ≥ 2.0
78
+ **Requirements:** Git ≥ 2.0
40
79
 
41
80
  ## Uninstallation
42
81
 
43
- ### NPM/Bun
44
-
45
82
  ```bash
46
- npm uninstall -g geeto
47
- # or
48
- bun remove -g geeto
49
- ```
83
+ # Homebrew
84
+ brew uninstall geeto && brew untap rust142/geeto
50
85
 
51
- ### From Source
86
+ # APT / Debian
87
+ sudo dpkg -r geeto
52
88
 
53
- ```bash
89
+ # NPM / Bun
90
+ npm uninstall -g geeto # or: bun remove -g geeto
91
+
92
+ # Binary (manual)
93
+ sudo rm /usr/local/bin/geeto
94
+
95
+ # From source
54
96
  curl -fsSL https://raw.githubusercontent.com/rust142/geeto/main/tools/uninstall.sh | bash
55
97
  ```
56
98
 
@@ -62,11 +104,15 @@ curl -fsSL https://raw.githubusercontent.com/rust142/geeto/main/tools/uninstall.
62
104
  geeto
63
105
  ```
64
106
 
107
+ [![Geeto Demo](https://github.com/rust142/geeto/raw/main/images/demo.png)](https://asciinema.org/a/788604)
108
+
109
+ [see demo](https://asciinema.org/a/788604)
110
+
65
111
  On first run, Geeto will automatically guide you through AI provider setup:
66
112
 
67
- - **Gemini** - Enter your API key (get one at [Google AI Studio](https://makersuite.google.com/app/apikey))
68
- - **OpenRouter** - Enter your API key (get one at [OpenRouter](https://openrouter.ai/keys))
69
- - **GitHub Copilot** - Auto-configured (requires [GitHub CLI](https://cli.github.com/))
113
+ - **Gemini** Enter your API key (get one at [Google AI Studio](https://makersuite.google.com/app/apikey))
114
+ - **OpenRouter** Enter your API key (get one at [OpenRouter](https://openrouter.ai/keys))
115
+ - **GitHub Copilot** Auto-configured (requires [GitHub CLI](https://cli.github.com/))
70
116
 
71
117
  All configurations are saved locally in `.geeto/` directory.
72
118
 
@@ -74,24 +120,77 @@ All configurations are saved locally in `.geeto/` directory.
74
120
 
75
121
  Geeto guides you through 6 steps:
76
122
 
77
- 1. **Stage** - Select files to commit
78
- 2. **Branch** - AI-generated branch name
79
- 3. **Commit** - AI-generated commit message
80
- 4. **Push** - Push to remote
81
- 5. **Merge** - Merge to target branch
82
- 6. **Cleanup** - Delete merged branches
123
+ 1. **Stage** Select files to commit
124
+ 2. **Branch** AI-generated branch name
125
+ 3. **Commit** AI-generated commit message
126
+ 4. **Push** Push to remote with progress bar
127
+ 5. **Merge** Merge to target branch
128
+ 6. **Cleanup** Delete merged branches
129
+
130
+ ## CLI Reference
131
+
132
+ ### Workflow
133
+
134
+ ```bash
135
+ geeto # Full workflow (stage → branch → commit → push → merge → cleanup)
136
+ geeto -s, --stage # Stage files interactively
137
+ geeto -sa, -as # Stage all changes automatically
138
+ geeto -c, --commit # Create a commit with AI message
139
+ geeto -b, --branch # Create a branch with AI name
140
+ geeto -p, --push # Push current branch to remote
141
+ geeto -m, --merge # Merge branches interactively
142
+ ```
143
+
144
+ ### Git Tools
145
+
146
+ ```bash
147
+ geeto -cl, --cleanup # Clean up local & remote branches
148
+ geeto -sw, --switch # Switch branches with fuzzy search
149
+ geeto -cmp, --compare # Compare current branch with another
150
+ geeto -cp, --cherry-pick # Cherry-pick from another branch
151
+ geeto -lg, --log # View commit history with timeline
152
+ geeto -sh, --stash # Manage stashes interactively
153
+ geeto -am, --amend # Amend the last commit
154
+ geeto -u, --undo # Undo the last git action safely
155
+ geeto -st, --stats # Repository statistics dashboard
156
+ ```
157
+
158
+ ### GitHub
159
+
160
+ ```bash
161
+ geeto -pr, --pr # Create a Pull Request
162
+ geeto -i, --issue # Create an Issue
163
+ geeto -t, --tag # Release & tag manager with semver
164
+ ```
165
+
166
+ ### Trello
167
+
168
+ ```bash
169
+ geeto -tr, --trello # Open Trello menu
170
+ geeto -tl, --trello-list # List boards and lists
171
+ geeto -tg, --trello-generate # Generate tasks from Trello
172
+ ```
173
+
174
+ ### Settings
175
+
176
+ ```bash
177
+ geeto --setup-gemini # Configure Gemini AI
178
+ geeto --setup-openrouter # Configure OpenRouter AI
179
+ geeto --setup-github # Configure GitHub token
180
+ geeto --setup-trello # Configure Trello integration
181
+ geeto --change-model # Switch AI provider / model
182
+ geeto --sync-models # Fetch latest model list
183
+ geeto --separator # Set branch name separator
184
+ ```
83
185
 
84
- ### CLI Flags
186
+ ### Editor & Options
85
187
 
86
188
  ```bash
87
- geeto --stage # Start from stage step
88
- geeto --branch # Start from branch creation
89
- geeto --commit # Start from commit step
90
- geeto --push # Start from push step
91
- geeto --merge # Start from merge step
92
- geeto --cleanup # Branch cleanup workflow
93
- geeto --trello # Trello integration menu
94
- geeto --settings # Configure AI providers
189
+ geeto <file> # Open file in inline editor with syntax highlighting
190
+ geeto -f, --fresh # Start fresh (ignore checkpoint)
191
+ geeto -r, --resume # Resume from last checkpoint
192
+ geeto -v, --version
193
+ geeto -h, --help
95
194
  ```
96
195
 
97
196
  ### Trello Integration
@@ -102,11 +201,11 @@ Generate task instruction files for AI agents:
102
201
  geeto --trello-generate
103
202
  ```
104
203
 
105
- Creates `.github/instructions/tasks.instructions.md` (VSCode) or editor-specific paths with:
204
+ Creates `.github/instructions/tasks.instructions.md` with:
106
205
 
107
- - Step-by-step task list from Trello
108
- - AI agent instructions (execute one task at a time)
109
- - Backend/Frontend best practices
206
+ - Step-by-step task list from Trello cards
207
+ - AI agent instructions (execute one task at a time, wait for confirmation)
208
+ - Backend/Frontend implementation checklists
110
209
 
111
210
  ## Development
112
211
 
@@ -119,12 +218,12 @@ bun install
119
218
  # Build
120
219
  bun run build
121
220
 
122
- # Development mode
221
+ # Development mode (run from source)
123
222
  bun run dev
124
223
 
125
224
  # Lint & Type Check
126
- bun run check:fast
127
- bun run check:full
225
+ bun run check:fast # Quick lint
226
+ bun run check:full # Full typecheck + lint
128
227
  ```
129
228
 
130
229
  See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
@@ -136,7 +235,7 @@ We welcome contributions! Please:
136
235
  1. Fork the repository
137
236
  2. Create a branch: `dev#your-feature`
138
237
  3. Make your changes
139
- 4. Run tests: `bun run check:fast && bun run check:full`
238
+ 4. Run checks: `bun run check:fast && bun run check:full`
140
239
  5. Submit a Pull Request to `develop` branch
141
240
 
142
241
  See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
@@ -152,4 +251,4 @@ If you find Geeto helpful, consider supporting the project:
152
251
 
153
252
  ## License
154
253
 
155
- This project is licensed under the MIT License.
254
+ MIT see [LICENSE](LICENSE) for details.
@@ -0,0 +1,91 @@
1
+ /**
2
+ * GitHub API integration
3
+ */
4
+ export interface GitHubPRParams {
5
+ owner: string;
6
+ repo: string;
7
+ title: string;
8
+ body: string;
9
+ head: string;
10
+ base: string;
11
+ draft?: boolean;
12
+ }
13
+ export interface GitHubPR {
14
+ number: number;
15
+ html_url: string;
16
+ title: string;
17
+ state: string;
18
+ head: {
19
+ ref: string;
20
+ };
21
+ base: {
22
+ ref: string;
23
+ };
24
+ draft: boolean;
25
+ user: {
26
+ login: string;
27
+ };
28
+ created_at: string;
29
+ }
30
+ export interface GitHubBranch {
31
+ name: string;
32
+ commit: {
33
+ sha: string;
34
+ };
35
+ protected: boolean;
36
+ }
37
+ /**
38
+ * Parse owner/repo from git remote URL
39
+ */
40
+ export declare const parseRepoFromUrl: (remoteUrl: string) => {
41
+ owner: string;
42
+ repo: string;
43
+ } | null;
44
+ /**
45
+ * Create a Pull Request
46
+ */
47
+ export declare const createPullRequest: (params: GitHubPRParams) => Promise<GitHubPR | null>;
48
+ /**
49
+ * List open Pull Requests for the repo
50
+ */
51
+ export declare const listPullRequests: (owner: string, repo: string, head?: string) => Promise<GitHubPR[]>;
52
+ /**
53
+ * Get default branch of the repo
54
+ */
55
+ export declare const getDefaultBranch: (owner: string, repo: string) => Promise<string | null>;
56
+ export interface GitHubIssueParams {
57
+ owner: string;
58
+ repo: string;
59
+ title: string;
60
+ body: string;
61
+ labels?: string[];
62
+ assignees?: string[];
63
+ }
64
+ export interface GitHubIssue {
65
+ number: number;
66
+ html_url: string;
67
+ title: string;
68
+ state: string;
69
+ user: {
70
+ login: string;
71
+ };
72
+ created_at: string;
73
+ labels: Array<{
74
+ name: string;
75
+ color: string;
76
+ }>;
77
+ }
78
+ export interface GitHubLabel {
79
+ name: string;
80
+ color: string;
81
+ description: string | null;
82
+ }
83
+ /**
84
+ * Create a GitHub Issue
85
+ */
86
+ export declare const createIssue: (params: GitHubIssueParams) => Promise<GitHubIssue | null>;
87
+ /**
88
+ * List labels for a repo
89
+ */
90
+ export declare const listLabels: (owner: string, repo: string) => Promise<GitHubLabel[]>;
91
+ //# sourceMappingURL=github.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../src/api/github.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;IACrB,IAAI,EAAE;Q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AK,EAAE,MAAM,CAAA;KAAE,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAC/C;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,GAAU,QAAQ,iBAAiB,KAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAiCvF,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,GAAU,OAAO,MAAM,EAAE,MAAM,MAAM,KAAG,OAAO,CAAC,WAAW,EAAE,CAUnF,CAAA"}
@@ -0,0 +1,163 @@
1
+ /**
2
+ * GitHub API integration
3
+ */
4
+ import { getGithubConfig } from '../utils/config.js';
5
+ import { log } from '../utils/logging.js';
6
+ /**
7
+ * Parse owner/repo from git remote URL
8
+ */
9
+ export const parseRepoFromUrl = (remoteUrl) => {
10
+ // Handle SSH: git@github.com:owner/repo.git
11
+ const sshMatch = remoteUrl.match(/git@github\.com:([^/]+)\/([^/.]+)(?:\.git)?/);
12
+ if (sshMatch?.[1] && sshMatch[2]) {
13
+ return { owner: sshMatch[1], repo: sshMatch[2] };
14
+ }
15
+ // Handle HTTPS: https://github.com/owner/repo.git
16
+ const httpsMatch = remoteUrl.match(/github\.com\/([^/]+)\/([^/.]+)(?:\.git)?/);
17
+ if (httpsMatch?.[1] && httpsMatch[2]) {
18
+ return { owner: httpsMatch[1], repo: httpsMatch[2] };
19
+ }
20
+ return null;
21
+ };
22
+ /**
23
+ * Make a GitHub API request
24
+ */
25
+ const githubFetch = async (endpoint, options = {}) => {
26
+ const config = getGithubConfig();
27
+ if (!config.token) {
28
+ throw new Error('GitHub token not configured');
29
+ }
30
+ const url = endpoint.startsWith('https://') ? endpoint : `https://api.github.com${endpoint}`;
31
+ return fetch(url, {
32
+ ...options,
33
+ headers: {
34
+ 'Accept': 'application/vnd.github+json',
35
+ 'Authorization': `Bearer ${config.token}`,
36
+ 'X-GitHub-Api-Version': '2022-11-28',
37
+ 'Content-Type': 'application/json',
38
+ ...options.headers,
39
+ },
40
+ });
41
+ };
42
+ /**
43
+ * Create a Pull Request
44
+ */
45
+ export const createPullRequest = async (params) => {
46
+ try {
47
+ const response = await githubFetch(`/repos/${params.owner}/${params.repo}/pulls`, {
48
+ method: 'POST',
49
+ body: JSON.stringify({
50
+ title: params.title,
51
+ body: params.body,
52
+ head: params.head,
53
+ base: params.base,
54
+ draft: params.draft ?? false,
55
+ }),
56
+ });
57
+ if (!response.ok) {
58
+ const error = (await response.json());
59
+ const details = error.errors?.map((e) => e.message).join(', ') ?? '';
60
+ console.log('');
61
+ log.error('GitHub API error: ' + `${response.status} - ` + `${error.message ?? response.statusText}`);
62
+ if (details)
63
+ log.error(`Details: ${details}`);
64
+ return null;
65
+ }
66
+ return (await response.json());
67
+ }
68
+ catch (error) {
69
+ const msg = error instanceof Error ? error.message : String(error);
70
+ console.log('');
71
+ log.error(`Failed to create PR: ${msg}`);
72
+ return null;
73
+ }
74
+ };
75
+ /**
76
+ * List open Pull Requests for the repo
77
+ */
78
+ export const listPullRequests = async (owner, repo, head) => {
79
+ try {
80
+ const params = new URLSearchParams({
81
+ state: 'open',
82
+ per_page: '30',
83
+ });
84
+ if (head) {
85
+ params.set('head', `${owner}:${head}`);
86
+ }
87
+ const response = await githubFetch(`/repos/${owner}/${repo}/pulls?` + `${params.toString()}`);
88
+ if (!response.ok) {
89
+ console.log('');
90
+ log.warn('GitHub API error: ' + `${response.status} ${response.statusText}`);
91
+ return [];
92
+ }
93
+ return (await response.json());
94
+ }
95
+ catch (error) {
96
+ const msg = error instanceof Error ? error.message : String(error);
97
+ console.log('');
98
+ log.warn(`Failed to list PRs: ${msg}`);
99
+ return [];
100
+ }
101
+ };
102
+ /**
103
+ * Get default branch of the repo
104
+ */
105
+ export const getDefaultBranch = async (owner, repo) => {
106
+ try {
107
+ const response = await githubFetch(`/repos/${owner}/${repo}`);
108
+ if (!response.ok)
109
+ return null;
110
+ const data = (await response.json());
111
+ return data.default_branch ?? null;
112
+ }
113
+ catch {
114
+ return null;
115
+ }
116
+ };
117
+ /**
118
+ * Create a GitHub Issue
119
+ */
120
+ export const createIssue = async (params) => {
121
+ try {
122
+ const response = await githubFetch(`/repos/${params.owner}/${params.repo}/issues`, {
123
+ method: 'POST',
124
+ body: JSON.stringify({
125
+ title: params.title,
126
+ body: params.body,
127
+ labels: params.labels ?? [],
128
+ assignees: params.assignees ?? [],
129
+ }),
130
+ });
131
+ if (!response.ok) {
132
+ const error = (await response.json());
133
+ const details = error.errors?.map((e) => e.message).join(', ') ?? '';
134
+ console.log('');
135
+ log.error('GitHub API error: ' + `${response.status} - ` + `${error.message ?? response.statusText}`);
136
+ if (details)
137
+ log.error(`Details: ${details}`);
138
+ return null;
139
+ }
140
+ return (await response.json());
141
+ }
142
+ catch (error) {
143
+ const msg = error instanceof Error ? error.message : String(error);
144
+ console.log('');
145
+ log.error(`Failed to create issue: ${msg}`);
146
+ return null;
147
+ }
148
+ };
149
+ /**
150
+ * List labels for a repo
151
+ */
152
+ export const listLabels = async (owner, repo) => {
153
+ try {
154
+ const response = await githubFetch(`/repos/${owner}/${repo}/labels?per_page=100`);
155
+ if (!response.ok)
156
+ return [];
157
+ return (await response.json());
158
+ }
159
+ catch {
160
+ return [];
161
+ }
162
+ };
163
+ //# sourceMappingURL=github.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github.js","sourceRoot":"","sources":["../../src/api/github.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AA8BzC;;GAEG;AACH,MAAM,CAAC,MAAM,gBAA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IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAA;IACX,CAAC;AACH,CAAC,CAAA"}
package/lib/api/trello.js CHANGED
@@ -37,7 +37,7 @@ export const fetchTrelloCards = async (listId) => {
37
37
  return [];
38
38
  }
39
39
  try {
40
- const response = await fetch(`https://api.trello.com/1/boards/${config.boardId}/cards?fields=id,name,desc,idShort,shortLink,url,idList&key=${config.apiKey}&token=${config.token}`, { method: 'GET' });
40
+ const response = await fetch(`https://api.trello.com/1/boards/${config.boardId}/cards?fields=id,name,desc,idShort,shortLink,url,idList&checklists=all&key=${config.apiKey}&token=${config.token}`, { method: 'GET' });
41
41
  if (!response.ok) {
42
42
  console.log(''); // Force newline to separate from any active spinner
43
43
  log.warn(`Trello API error: ${response.status} ${response.statusText}`);
@@ -1 +1 @@
1
- {"version":3,"file":"trello.js","sourceRoot":"","sources":["../../src/api/trello.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAEzC;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,IAA2B,EAAE;IAChE,MAAM,MAAM,GAAG,eAAe,EAAE,CAAA;IAChC,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACvD,OAAO,EAAE,CAAA;IACX,CAAC;IAED,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAC1B,mCAAmC,MAAM,CAAC,OAAO,cAAc,MAAM,CAAC,MAAM,UAAU,MAAM,CAAC,KAAK,EAAE,EACpG,EAAE,MAAM,EAAE,KAAK,EAAE,CAClB,CAAA;QAED,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA,CAAC,oDAAoD;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,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAC7E,CAAA;IACH,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,MAAM,GAAG,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QAClE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA,CAAC,oDAAoD;QACpE,GAAG,CAAC,IAAI,CAAC,iCAAiC,GAAG,EAAE,CAAC,CAAA;QAChD,OAAO,EAAE,CAAA;IACX,CAAC;AACH,CAAC,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAC/C,SAAiB,EACjB,MAAc,EACd,YAAoB,GAAG,EACf,EAAE;IACV,MAAM,UAAU,GAAG,SAAS;SACzB,WAAW,EAAE;SACb,UAAU,CAAC,YAAY,EAAE,EAAE,CAAC;SAC5B,UAAU,CAAC,MAAM,EAAE,SAAS,CAAC;SAC7B,OAAO,CAAC,SAAS,KAAK,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,SAAS,CAAC;SACrD,OAAO,CAAC,SAAS,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;IACvD,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,EAAE,CAAA;AAC7C,CAAC,CAAA"}
@@ -27,6 +27,7 @@ export declare const highlightDiff: (diff: string) => string;
27
27
  * Ask a yes/no confirmation question
28
28
  */
29
29
  export declare const confirm: (question: string, defaultYes?: boolean) => boolean;
30
+ export declare const editInline: (initialText: string, label?: string, syntax?: string) => Promise<string | null>;
30
31
  /**
31
32
  * Edit multi-line content in the user's editor (from $EDITOR).
32
33
  * Writes initialText to a temp file, opens $EDITOR, and returns the edited content.
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/cli/input.ts"],"names":[],"mappings":"AAAA;;GAEG;AAaH;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,EAAE,eAAe,MAAM,KAAG,MAsBrE,CAAA;AAED;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,KAAK,CAAQ;gBAET,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,MAAmB,EAAE,KAAK,GAAE,MAAW;IAOzE,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAK7B,SAAS,CAAC,MAAM,GAAE,MAAU,GAAG,IAAI;IAKnC,QAAQ,IAAI,IAAI;IAMhB,OAAO,CAAC,MAAM;CAUf;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,KAAG,MAO5C,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,OAAO,GAAI,UAAU,MAAM,EAAE,aAAY,OAAc,KAAG,OAOtE,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,oBAAgB,EAAE,qBAAiC,KAAG,MAkBlF,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,QAAO,IAE7B,CAAA"}
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/cli/input.ts"],"names":[],"mappings":"AAAA;;GAEG;AAaH;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,EAAE,eAAe,MAAM,KAAG,MAsBrE,CAAA;AAED;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,K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