@bretwardjames/ghp-cli 0.1.1 → 0.1.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.
- package/dist/branch-linker.d.ts +31 -9
- package/dist/branch-linker.d.ts.map +1 -1
- package/dist/branch-linker.js +61 -35
- package/dist/branch-linker.js.map +1 -1
- package/dist/commands/link-branch.d.ts.map +1 -1
- package/dist/commands/link-branch.js +20 -0
- package/dist/commands/link-branch.js.map +1 -1
- package/dist/commands/plan.d.ts.map +1 -1
- package/dist/commands/plan.js +235 -95
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/set-field.d.ts.map +1 -1
- package/dist/commands/set-field.js +25 -1
- package/dist/commands/set-field.js.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +21 -0
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/switch.d.ts.map +1 -1
- package/dist/commands/switch.js +20 -0
- package/dist/commands/switch.js.map +1 -1
- package/dist/commands/sync.d.ts +2 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +77 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/commands/work.d.ts +5 -0
- package/dist/commands/work.d.ts.map +1 -1
- package/dist/commands/work.js +226 -36
- package/dist/commands/work.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/git-utils.d.ts +6 -52
- package/dist/git-utils.d.ts.map +1 -1
- package/dist/git-utils.js +7 -137
- package/dist/git-utils.js.map +1 -1
- package/dist/github-api.d.ts +17 -108
- package/dist/github-api.d.ts.map +1 -1
- package/dist/github-api.js +48 -579
- package/dist/github-api.js.map +1 -1
- package/dist/index.js +16 -2
- package/dist/index.js.map +1 -1
- package/dist/table.d.ts +16 -0
- package/dist/table.d.ts.map +1 -0
- package/dist/table.js +230 -0
- package/dist/table.js.map +1 -0
- package/dist/types.d.ts +6 -36
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -1
- package/package.json +2 -2
package/dist/github-api.d.ts
CHANGED
|
@@ -1,110 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* Get projects linked to a repository
|
|
16
|
-
*/
|
|
17
|
-
getProjects(repo: RepoInfo): Promise<Project[]>;
|
|
18
|
-
/**
|
|
19
|
-
* Get items from a project
|
|
20
|
-
*/
|
|
21
|
-
getProjectItems(projectId: string, projectTitle: string): Promise<ProjectItem[]>;
|
|
22
|
-
/**
|
|
23
|
-
* Get the Status field info for a project
|
|
24
|
-
*/
|
|
25
|
-
getStatusField(projectId: string): Promise<StatusField | null>;
|
|
26
|
-
/**
|
|
27
|
-
* Update an item's status
|
|
28
|
-
*/
|
|
29
|
-
updateItemStatus(projectId: string, itemId: string, fieldId: string, optionId: string): Promise<boolean>;
|
|
30
|
-
/**
|
|
31
|
-
* Find an item by issue number across all projects for this repo
|
|
32
|
-
*/
|
|
33
|
-
findItemByNumber(repo: RepoInfo, issueNumber: number): Promise<ProjectItem | null>;
|
|
34
|
-
/**
|
|
35
|
-
* Get all fields for a project
|
|
36
|
-
*/
|
|
37
|
-
getProjectFields(projectId: string): Promise<Array<{
|
|
38
|
-
id: string;
|
|
39
|
-
name: string;
|
|
40
|
-
type: string;
|
|
41
|
-
options?: Array<{
|
|
42
|
-
id: string;
|
|
43
|
-
name: string;
|
|
44
|
-
}>;
|
|
45
|
-
}>>;
|
|
46
|
-
/**
|
|
47
|
-
* Set a field value on a project item
|
|
48
|
-
*/
|
|
49
|
-
setFieldValue(projectId: string, itemId: string, fieldId: string, value: {
|
|
50
|
-
text?: string;
|
|
51
|
-
number?: number;
|
|
52
|
-
singleSelectOptionId?: string;
|
|
53
|
-
}): Promise<boolean>;
|
|
54
|
-
/**
|
|
55
|
-
* Create a new issue
|
|
56
|
-
*/
|
|
57
|
-
createIssue(repo: RepoInfo, title: string, body?: string): Promise<{
|
|
58
|
-
id: string;
|
|
59
|
-
number: number;
|
|
60
|
-
} | null>;
|
|
61
|
-
/**
|
|
62
|
-
* Add an issue to a project
|
|
63
|
-
*/
|
|
64
|
-
addToProject(projectId: string, contentId: string): Promise<string | null>;
|
|
65
|
-
/**
|
|
66
|
-
* Get full issue details including body and comments
|
|
67
|
-
*/
|
|
68
|
-
getIssueDetails(repo: RepoInfo, issueNumber: number): Promise<IssueDetails | null>;
|
|
69
|
-
/**
|
|
70
|
-
* Add a comment to an issue or PR
|
|
71
|
-
*/
|
|
72
|
-
addComment(repo: RepoInfo, issueNumber: number, body: string): Promise<boolean>;
|
|
73
|
-
/**
|
|
74
|
-
* Get repository collaborators (for @ mention suggestions)
|
|
75
|
-
*/
|
|
76
|
-
getCollaborators(repo: RepoInfo): Promise<Collaborator[]>;
|
|
77
|
-
/**
|
|
78
|
-
* Get recent issues (for # reference suggestions)
|
|
79
|
-
*/
|
|
80
|
-
getRecentIssues(repo: RepoInfo, limit?: number): Promise<IssueReference[]>;
|
|
1
|
+
/**
|
|
2
|
+
* CLI-specific GitHub API wrapper.
|
|
3
|
+
*
|
|
4
|
+
* This module wraps the core GitHubAPI class with CLI-specific behavior:
|
|
5
|
+
* - Token from `gh auth token` or environment variables
|
|
6
|
+
* - Chalk-colored error messages
|
|
7
|
+
* - process.exit on auth errors
|
|
8
|
+
*/
|
|
9
|
+
import { GitHubAPI as CoreGitHubAPI } from '@bretwardjames/ghp-core';
|
|
10
|
+
/**
|
|
11
|
+
* Extended GitHubAPI class for CLI with pre-configured token provider
|
|
12
|
+
*/
|
|
13
|
+
declare class CLIGitHubAPI extends CoreGitHubAPI {
|
|
14
|
+
constructor();
|
|
81
15
|
}
|
|
82
|
-
export
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
state: string;
|
|
86
|
-
type: 'issue' | 'pull_request';
|
|
87
|
-
createdAt: string;
|
|
88
|
-
author: string;
|
|
89
|
-
labels: Array<{
|
|
90
|
-
name: string;
|
|
91
|
-
color: string;
|
|
92
|
-
}>;
|
|
93
|
-
comments: Array<{
|
|
94
|
-
author: string;
|
|
95
|
-
body: string;
|
|
96
|
-
createdAt: string;
|
|
97
|
-
}>;
|
|
98
|
-
totalComments: number;
|
|
99
|
-
}
|
|
100
|
-
export interface Collaborator {
|
|
101
|
-
login: string;
|
|
102
|
-
name: string | null;
|
|
103
|
-
}
|
|
104
|
-
export interface IssueReference {
|
|
105
|
-
number: number;
|
|
106
|
-
title: string;
|
|
107
|
-
state: string;
|
|
108
|
-
}
|
|
109
|
-
export declare const api: GitHubAPI;
|
|
16
|
+
export type { RepoInfo, Project, ProjectItem, StatusField, IssueDetails, Collaborator, IssueReference, } from '@bretwardjames/ghp-core';
|
|
17
|
+
export declare const api: CLIGitHubAPI;
|
|
18
|
+
export { CLIGitHubAPI as GitHubAPI };
|
|
110
19
|
//# sourceMappingURL=github-api.d.ts.map
|
package/dist/github-api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-api.d.ts","sourceRoot":"","sources":["../src/github-api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github-api.d.ts","sourceRoot":"","sources":["../src/github-api.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,EACH,SAAS,IAAI,aAAa,EAG7B,MAAM,yBAAyB,CAAC;AAgDjC;;GAEG;AACH,cAAM,YAAa,SAAQ,aAAa;;CAOvC;AAGD,YAAY,EACR,QAAQ,EACR,OAAO,EACP,WAAW,EACX,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,cAAc,GACjB,MAAM,yBAAyB,CAAC;AAGjC,eAAO,MAAM,GAAG,cAAqB,CAAC;AAGtC,OAAO,EAAE,YAAY,IAAI,SAAS,EAAE,CAAC"}
|