@bretwardjames/ghp-cli 0.1.2 → 0.1.4
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/edit.d.ts +2 -0
- package/dist/commands/edit.d.ts.map +1 -0
- package/dist/commands/edit.js +126 -0
- package/dist/commands/edit.js.map +1 -0
- 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 -146
- package/dist/github-api.d.ts.map +1 -1
- package/dist/github-api.js +48 -864
- package/dist/github-api.js.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +6 -38
- 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,148 +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
|
-
* Get project views
|
|
28
|
-
*/
|
|
29
|
-
getProjectViews(projectId: string): Promise<Array<{
|
|
30
|
-
name: string;
|
|
31
|
-
filter: string | null;
|
|
32
|
-
}>>;
|
|
33
|
-
/**
|
|
34
|
-
* Update an item's status
|
|
35
|
-
*/
|
|
36
|
-
updateItemStatus(projectId: string, itemId: string, fieldId: string, optionId: string): Promise<boolean>;
|
|
37
|
-
/**
|
|
38
|
-
* Find an item by issue number across all projects for this repo
|
|
39
|
-
*/
|
|
40
|
-
findItemByNumber(repo: RepoInfo, issueNumber: number): Promise<ProjectItem | null>;
|
|
41
|
-
/**
|
|
42
|
-
* Get all fields for a project
|
|
43
|
-
*/
|
|
44
|
-
getProjectFields(projectId: string): Promise<Array<{
|
|
45
|
-
id: string;
|
|
46
|
-
name: string;
|
|
47
|
-
type: string;
|
|
48
|
-
options?: Array<{
|
|
49
|
-
id: string;
|
|
50
|
-
name: string;
|
|
51
|
-
}>;
|
|
52
|
-
}>>;
|
|
53
|
-
/**
|
|
54
|
-
* Set a field value on a project item
|
|
55
|
-
*/
|
|
56
|
-
setFieldValue(projectId: string, itemId: string, fieldId: string, value: {
|
|
57
|
-
text?: string;
|
|
58
|
-
number?: number;
|
|
59
|
-
singleSelectOptionId?: string;
|
|
60
|
-
}): Promise<boolean>;
|
|
61
|
-
/**
|
|
62
|
-
* Create a new issue
|
|
63
|
-
*/
|
|
64
|
-
createIssue(repo: RepoInfo, title: string, body?: string): Promise<{
|
|
65
|
-
id: string;
|
|
66
|
-
number: number;
|
|
67
|
-
} | null>;
|
|
68
|
-
/**
|
|
69
|
-
* Add an issue to a project
|
|
70
|
-
*/
|
|
71
|
-
addToProject(projectId: string, contentId: string): Promise<string | null>;
|
|
72
|
-
/**
|
|
73
|
-
* Get full issue details including body and comments
|
|
74
|
-
*/
|
|
75
|
-
getIssueDetails(repo: RepoInfo, issueNumber: number): Promise<IssueDetails | null>;
|
|
76
|
-
/**
|
|
77
|
-
* Add a comment to an issue or PR
|
|
78
|
-
*/
|
|
79
|
-
addComment(repo: RepoInfo, issueNumber: number, body: string): Promise<boolean>;
|
|
80
|
-
/**
|
|
81
|
-
* Get repository collaborators (for @ mention suggestions)
|
|
82
|
-
*/
|
|
83
|
-
getCollaborators(repo: RepoInfo): Promise<Collaborator[]>;
|
|
84
|
-
/**
|
|
85
|
-
* Get recent issues (for # reference suggestions)
|
|
86
|
-
*/
|
|
87
|
-
getRecentIssues(repo: RepoInfo, limit?: number): Promise<IssueReference[]>;
|
|
88
|
-
/**
|
|
89
|
-
* Get the active label name for a user
|
|
90
|
-
*/
|
|
91
|
-
getActiveLabelName(): string;
|
|
92
|
-
/**
|
|
93
|
-
* Ensure a label exists in the repository, create if it doesn't
|
|
94
|
-
*/
|
|
95
|
-
ensureLabel(repo: RepoInfo, labelName: string, color?: string): Promise<boolean>;
|
|
96
|
-
/**
|
|
97
|
-
* Add a label to an issue
|
|
98
|
-
*/
|
|
99
|
-
addLabelToIssue(repo: RepoInfo, issueNumber: number, labelName: string): Promise<boolean>;
|
|
100
|
-
/**
|
|
101
|
-
* Remove a label from an issue
|
|
102
|
-
*/
|
|
103
|
-
removeLabelFromIssue(repo: RepoInfo, issueNumber: number, labelName: string): Promise<boolean>;
|
|
104
|
-
/**
|
|
105
|
-
* Find all issues with a specific label
|
|
106
|
-
*/
|
|
107
|
-
findIssuesWithLabel(repo: RepoInfo, labelName: string): Promise<number[]>;
|
|
108
|
-
/**
|
|
109
|
-
* Get available issue types for a repository
|
|
110
|
-
*/
|
|
111
|
-
getIssueTypes(repo: RepoInfo): Promise<Array<{
|
|
112
|
-
id: string;
|
|
113
|
-
name: string;
|
|
114
|
-
}>>;
|
|
115
|
-
/**
|
|
116
|
-
* Set the issue type on an issue
|
|
117
|
-
*/
|
|
118
|
-
setIssueType(repo: RepoInfo, issueNumber: number, issueTypeId: string): Promise<boolean>;
|
|
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();
|
|
119
15
|
}
|
|
120
|
-
export
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
state: string;
|
|
124
|
-
type: 'issue' | 'pull_request';
|
|
125
|
-
createdAt: string;
|
|
126
|
-
author: string;
|
|
127
|
-
labels: Array<{
|
|
128
|
-
name: string;
|
|
129
|
-
color: string;
|
|
130
|
-
}>;
|
|
131
|
-
comments: Array<{
|
|
132
|
-
author: string;
|
|
133
|
-
body: string;
|
|
134
|
-
createdAt: string;
|
|
135
|
-
}>;
|
|
136
|
-
totalComments: number;
|
|
137
|
-
}
|
|
138
|
-
export interface Collaborator {
|
|
139
|
-
login: string;
|
|
140
|
-
name: string | null;
|
|
141
|
-
}
|
|
142
|
-
export interface IssueReference {
|
|
143
|
-
number: number;
|
|
144
|
-
title: string;
|
|
145
|
-
state: string;
|
|
146
|
-
}
|
|
147
|
-
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 };
|
|
148
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"}
|