@bretwardjames/ghp-cli 0.1.2 → 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.
@@ -1,15 +1,37 @@
1
- interface BranchLink {
2
- branch: string;
3
- issueNumber: number;
4
- issueTitle: string;
5
- itemId: string;
6
- repo: string;
7
- linkedAt: string;
8
- }
1
+ /**
2
+ * CLI-specific branch linker with file-based storage.
3
+ *
4
+ * This module wraps the core BranchLinker with a file-based StorageAdapter
5
+ * that stores links in ~/.config/ghp-cli/branch-links.json
6
+ */
7
+ import { BranchLinker, type StorageAdapter, type BranchLink } from '@bretwardjames/ghp-core';
8
+ /**
9
+ * File-based storage adapter for CLI usage
10
+ */
11
+ declare const fileStorageAdapter: StorageAdapter;
12
+ declare const linker: BranchLinker;
13
+ /**
14
+ * Create a link between a branch and an issue.
15
+ * Backwards-compatible function signature for existing CLI code.
16
+ */
9
17
  export declare function linkBranch(branch: string, issueNumber: number, issueTitle: string, itemId: string, repo: string): void;
18
+ /**
19
+ * Remove the link for an issue.
20
+ * @returns true if a link was removed, false if no link existed
21
+ */
10
22
  export declare function unlinkBranch(repo: string, issueNumber: number): boolean;
23
+ /**
24
+ * Get the branch linked to an issue.
25
+ */
11
26
  export declare function getBranchForIssue(repo: string, issueNumber: number): string | null;
27
+ /**
28
+ * Get the full link info for a branch.
29
+ */
12
30
  export declare function getIssueForBranch(repo: string, branch: string): BranchLink | null;
31
+ /**
32
+ * Get all links for a repository.
33
+ */
13
34
  export declare function getAllLinksForRepo(repo: string): BranchLink[];
14
- export {};
35
+ export type { BranchLink } from '@bretwardjames/ghp-core';
36
+ export { linker, fileStorageAdapter };
15
37
  //# sourceMappingURL=branch-linker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"branch-linker.d.ts","sourceRoot":"","sources":["../src/branch-linker.ts"],"names":[],"mappings":"AAIA,UAAU,UAAU;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,M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,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIlF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAGjF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,EAAE,CAG7D;AAGD,YAAY,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAG1D,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC"}
@@ -1,60 +1,86 @@
1
+ /**
2
+ * CLI-specific branch linker with file-based storage.
3
+ *
4
+ * This module wraps the core BranchLinker with a file-based StorageAdapter
5
+ * that stores links in ~/.config/ghp-cli/branch-links.json
6
+ */
1
7
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from 'fs';
2
8
  import { homedir } from 'os';
3
9
  import { join } from 'path';
10
+ import { BranchLinker, } from '@bretwardjames/ghp-core';
4
11
  const DATA_DIR = join(homedir(), '.config', 'ghp-cli');
5
12
  const LINKS_FILE = join(DATA_DIR, 'branch-links.json');
6
- function loadLinks() {
7
- try {
8
- if (existsSync(LINKS_FILE)) {
9
- const data = readFileSync(LINKS_FILE, 'utf-8');
10
- return JSON.parse(data);
13
+ /**
14
+ * File-based storage adapter for CLI usage
15
+ */
16
+ const fileStorageAdapter = {
17
+ load() {
18
+ try {
19
+ if (existsSync(LINKS_FILE)) {
20
+ const data = readFileSync(LINKS_FILE, 'utf-8');
21
+ return JSON.parse(data);
22
+ }
11
23
  }
12
- }
13
- catch {
14
- // Ignore errors
15
- }
16
- return [];
17
- }
18
- function saveLinks(links) {
19
- if (!existsSync(DATA_DIR)) {
20
- mkdirSync(DATA_DIR, { recursive: true });
21
- }
22
- writeFileSync(LINKS_FILE, JSON.stringify(links, null, 2));
23
- }
24
+ catch {
25
+ // Ignore errors, return empty array
26
+ }
27
+ return [];
28
+ },
29
+ save(links) {
30
+ if (!existsSync(DATA_DIR)) {
31
+ mkdirSync(DATA_DIR, { recursive: true });
32
+ }
33
+ writeFileSync(LINKS_FILE, JSON.stringify(links, null, 2));
34
+ },
35
+ };
36
+ // Create singleton linker instance
37
+ const linker = new BranchLinker(fileStorageAdapter);
38
+ /**
39
+ * Create a link between a branch and an issue.
40
+ * Backwards-compatible function signature for existing CLI code.
41
+ */
24
42
  export function linkBranch(branch, issueNumber, issueTitle, itemId, repo) {
25
- const links = loadLinks();
26
- // Remove existing link for this branch or issue in this repo
27
- const filtered = links.filter(l => !(l.repo === repo && (l.branch === branch || l.issueNumber === issueNumber)));
28
- filtered.push({
29
- branch,
30
- issueNumber,
31
- issueTitle,
32
- itemId,
33
- repo,
34
- linkedAt: new Date().toISOString(),
35
- });
36
- saveLinks(filtered);
43
+ // Use sync-like behavior for backwards compatibility
44
+ // The file adapter is synchronous so this works
45
+ linker.link(branch, issueNumber, issueTitle, itemId, repo);
37
46
  }
47
+ /**
48
+ * Remove the link for an issue.
49
+ * @returns true if a link was removed, false if no link existed
50
+ */
38
51
  export function unlinkBranch(repo, issueNumber) {
39
- const links = loadLinks();
52
+ // Load, filter, and save synchronously for backwards compatibility
53
+ const adapter = fileStorageAdapter;
54
+ const links = adapter.load();
40
55
  const filtered = links.filter(l => !(l.repo === repo && l.issueNumber === issueNumber));
41
56
  if (filtered.length === links.length) {
42
- return false; // Nothing was removed
57
+ return false;
43
58
  }
44
- saveLinks(filtered);
59
+ adapter.save(filtered);
45
60
  return true;
46
61
  }
62
+ /**
63
+ * Get the branch linked to an issue.
64
+ */
47
65
  export function getBranchForIssue(repo, issueNumber) {
48
- const links = loadLinks();
66
+ const links = fileStorageAdapter.load();
49
67
  const link = links.find(l => l.repo === repo && l.issueNumber === issueNumber);
50
68
  return link?.branch || null;
51
69
  }
70
+ /**
71
+ * Get the full link info for a branch.
72
+ */
52
73
  export function getIssueForBranch(repo, branch) {
53
- const links = loadLinks();
74
+ const links = fileStorageAdapter.load();
54
75
  return links.find(l => l.repo === repo && l.branch === branch) || null;
55
76
  }
77
+ /**
78
+ * Get all links for a repository.
79
+ */
56
80
  export function getAllLinksForRepo(repo) {
57
- const links = loadLinks();
81
+ const links = fileStorageAdapter.load();
58
82
  return links.filter(l => l.repo === repo);
59
83
  }
84
+ // Also export the linker instance and adapter for advanced usage
85
+ export { linker, fileStorageAdapter };
60
86
  //# sourceMappingURL=branch-linker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"branch-linker.js","sourceRoot":"","sources":["../src/branch-linker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAW5B,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AACvD,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,EAAE,mBAAmB,CAAC,CAAC;AAEvD,SAAS,SAAS;IACd,IAAI,CAAC;QACD,IAAI,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,GAAG,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;YAC/C,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACL,gBAAgB;IACpB,CAAC;IACD,OAAO,EAAE,CAAC;AACd,CAAC;AAED,SAAS,SAAS,CAAC,KAAmB;IAClC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxB,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7C,CAAC;IACD,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAA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AO,KAAK,CAAC;IACjB,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvB,OAAO,IAAI,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAY,EAAE,WAAmB;IAC/D,MAAM,KAAK,GAAG,kBAAkB,CAAC,IAAI,EAAkB,CAAC;IACxD,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,WAAW,KAAK,WAAW,CAAC,CAAC;IAC/E,OAAO,IAAI,EAAE,MAAM,IAAI,IAAI,CAAC;AAChC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAY,EAAE,MAAc;IAC1D,MAAM,KAAK,GAAG,kBAAkB,CAAC,IAAI,EAAkB,CAAC;IACxD,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC;AAC3E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC3C,MAAM,KAAK,GAAG,kBAAkB,CAAC,IAAI,EAAkB,CAAC;IACxD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAC9C,CAAC;AAKD,iEAAiE;AACjE,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC"}
@@ -1,55 +1,9 @@
1
- import type { RepoInfo } from './types.js';
2
1
  /**
3
- * Detect the GitHub repository from the current directory's git remote
2
+ * Git utilities re-exported from core library.
3
+ *
4
+ * For CLI usage, all functions use process.cwd() by default.
5
+ * The core library accepts an optional { cwd } parameter for IDE integrations.
4
6
  */
5
- export declare function detectRepository(): Promise<RepoInfo | null>;
6
- /**
7
- * Parse a GitHub URL into owner and repo name
8
- */
9
- export declare function parseGitHubUrl(url: string): RepoInfo | null;
10
- /**
11
- * Get the current git branch
12
- */
13
- export declare function getCurrentBranch(): Promise<string | null>;
14
- /**
15
- * Check if there are uncommitted changes
16
- */
17
- export declare function hasUncommittedChanges(): Promise<boolean>;
18
- /**
19
- * Check if a branch exists locally
20
- */
21
- export declare function branchExists(branchName: string): Promise<boolean>;
22
- /**
23
- * Create and checkout a new branch
24
- */
25
- export declare function createBranch(branchName: string): Promise<void>;
26
- /**
27
- * Checkout an existing branch
28
- */
29
- export declare function checkoutBranch(branchName: string): Promise<void>;
30
- /**
31
- * Pull latest from origin
32
- */
33
- export declare function pullLatest(): Promise<void>;
34
- /**
35
- * Fetch from origin
36
- */
37
- export declare function fetchOrigin(): Promise<void>;
38
- /**
39
- * Get number of commits behind origin
40
- */
41
- export declare function getCommitsBehind(branch: string): Promise<number>;
42
- /**
43
- * Sanitize a string for use in a branch name
44
- */
45
- export declare function sanitizeForBranchName(str: string): string;
46
- /**
47
- * Generate a branch name from a pattern
48
- */
49
- export declare function generateBranchName(pattern: string, vars: {
50
- user: string;
51
- number: number | null;
52
- title: string;
53
- repo: string;
54
- }, maxLength?: number): string;
7
+ export { detectRepository, getCurrentBranch, hasUncommittedChanges, branchExists, createBranch, checkoutBranch, pullLatest, fetchOrigin, getCommitsBehind, getCommitsAhead, isGitRepository, getRepositoryRoot, sanitizeForBranchName, generateBranchName, getDefaultBranch, parseGitHubUrl, } from '@bretwardjames/ghp-core';
8
+ export type { RepoInfo, GitOptions } from '@bretwardjames/ghp-core';
55
9
  //# sourceMappingURL=git-utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"git-utils.d.ts","sourceRoot":"","sources":["../src/git-utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAI3C;;GAEG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,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H,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,GACjB,MAAM,yBAAyB,CAAC;AAGjC,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC"}
package/dist/git-utils.js CHANGED
@@ -1,140 +1,10 @@
1
- import { exec } from 'child_process';
2
- import { promisify } from 'util';
3
- const execAsync = promisify(exec);
4
1
  /**
5
- * Detect the GitHub repository from the current directory's git remote
2
+ * Git utilities re-exported from core library.
3
+ *
4
+ * For CLI usage, all functions use process.cwd() by default.
5
+ * The core library accepts an optional { cwd } parameter for IDE integrations.
6
6
  */
7
- export async function detectRepository() {
8
- try {
9
- const { stdout } = await execAsync('git remote get-url origin');
10
- const url = stdout.trim();
11
- return parseGitHubUrl(url);
12
- }
13
- catch {
14
- return null;
15
- }
16
- }
17
- /**
18
- * Parse a GitHub URL into owner and repo name
19
- */
20
- export function parseGitHubUrl(url) {
21
- // Handle SSH format: git@github.com:owner/repo.git
22
- const sshMatch = url.match(/git@github\.com:([^/]+)\/(.+?)(?:\.git)?$/);
23
- if (sshMatch) {
24
- return {
25
- owner: sshMatch[1],
26
- name: sshMatch[2],
27
- fullName: `${sshMatch[1]}/${sshMatch[2]}`,
28
- };
29
- }
30
- // Handle HTTPS format: https://github.com/owner/repo.git
31
- const httpsMatch = url.match(/https:\/\/github\.com\/([^/]+)\/(.+?)(?:\.git)?$/);
32
- if (httpsMatch) {
33
- return {
34
- owner: httpsMatch[1],
35
- name: httpsMatch[2],
36
- fullName: `${httpsMatch[1]}/${httpsMatch[2]}`,
37
- };
38
- }
39
- return null;
40
- }
41
- /**
42
- * Get the current git branch
43
- */
44
- export async function getCurrentBranch() {
45
- try {
46
- const { stdout } = await execAsync('git branch --show-current');
47
- return stdout.trim() || null;
48
- }
49
- catch {
50
- return null;
51
- }
52
- }
53
- /**
54
- * Check if there are uncommitted changes
55
- */
56
- export async function hasUncommittedChanges() {
57
- try {
58
- const { stdout } = await execAsync('git status --porcelain');
59
- return stdout.trim().length > 0;
60
- }
61
- catch {
62
- return false;
63
- }
64
- }
65
- /**
66
- * Check if a branch exists locally
67
- */
68
- export async function branchExists(branchName) {
69
- try {
70
- await execAsync(`git show-ref --verify --quiet refs/heads/${branchName}`);
71
- return true;
72
- }
73
- catch {
74
- return false;
75
- }
76
- }
77
- /**
78
- * Create and checkout a new branch
79
- */
80
- export async function createBranch(branchName) {
81
- await execAsync(`git checkout -b "${branchName}"`);
82
- }
83
- /**
84
- * Checkout an existing branch
85
- */
86
- export async function checkoutBranch(branchName) {
87
- await execAsync(`git checkout "${branchName}"`);
88
- }
89
- /**
90
- * Pull latest from origin
91
- */
92
- export async function pullLatest() {
93
- await execAsync('git pull');
94
- }
95
- /**
96
- * Fetch from origin
97
- */
98
- export async function fetchOrigin() {
99
- await execAsync('git fetch origin');
100
- }
101
- /**
102
- * Get number of commits behind origin
103
- */
104
- export async function getCommitsBehind(branch) {
105
- try {
106
- await fetchOrigin();
107
- const { stdout } = await execAsync(`git rev-list --count ${branch}..origin/${branch}`);
108
- return parseInt(stdout.trim(), 10) || 0;
109
- }
110
- catch {
111
- return 0;
112
- }
113
- }
114
- /**
115
- * Sanitize a string for use in a branch name
116
- */
117
- export function sanitizeForBranchName(str) {
118
- return str
119
- .toLowerCase()
120
- .replace(/[^a-z0-9-]/g, '-')
121
- .replace(/-+/g, '-')
122
- .replace(/^-|-$/g, '')
123
- .substring(0, 50);
124
- }
125
- /**
126
- * Generate a branch name from a pattern
127
- */
128
- export function generateBranchName(pattern, vars, maxLength = 60) {
129
- const sanitizedTitle = sanitizeForBranchName(vars.title);
130
- let branch = pattern
131
- .replace('{user}', vars.user)
132
- .replace('{number}', vars.number?.toString() || 'draft')
133
- .replace('{title}', sanitizedTitle)
134
- .replace('{repo}', vars.repo);
135
- if (branch.length > maxLength) {
136
- branch = branch.substring(0, maxLength).replace(/-$/, '');
137
- }
138
- return branch;
139
- }
7
+ // Re-export all git utilities from core
8
+ // These all use process.cwd() by default, which is correct for CLI usage
9
+ export { detectRepository, getCurrentBranch, hasUncommittedChanges, branchExists, createBranch, checkoutBranch, pullLatest, fetchOrigin, getCommitsBehind, getCommitsAhead, isGitRepository, getRepositoryRoot, sanitizeForBranchName, generateBranchName, getDefaultBranch, parseGitHubUrl, } from '@bretwardjames/ghp-core';
140
10
  //# sourceMappingURL=git-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"git-utils.js","sourceRoot":"","sources":["../src/git-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAGjC,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB;IAClC,IAAI,CAAC;QACD,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,SAAS,CAAC,2BAA2B,CAAC,CAAC;QAChE,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;QAC1B,OAAO,cAAc,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,IAAI,CAAC;IAChB,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,GAAW;IACtC,mDAAmD;IACnD,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC;IACxE,IAAI,QAAQ,EAAE,CAAC;QACX,OAAO;YACH,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;YAClB,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;YACjB,QAAQ,EAAE,GAAG,QAAQ,CAAC,CAAC,CA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AEzD,IAAI,MAAM,GAAG,OAAO;SACf,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC;SAC5B,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,OAAO,CAAC;SACvD,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC;SAClC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAElC,IAAI,MAAM,CAAC,MAAM,GAAG,SAAS,EAAE,CAAC;QAC5B,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC"}
1
+ {"version":3,"file":"git-utils.js","sourceRoot":"","sources":["../src/git-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,wCAAwC;AACxC,yEAAyE;AACzE,OAAO,EACH,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,GACjB,MAAM,yBAAyB,CAAC"}
@@ -1,148 +1,19 @@
1
- import type { RepoInfo, ProjectItem, Project, StatusField } from './types.js';
2
- export declare class GitHubAPI {
3
- private graphqlWithAuth;
4
- username: string | null;
5
- /**
6
- * Get token from gh CLI or environment variable
7
- */
8
- getToken(): Promise<string | null>;
9
- /**
10
- * Authenticate with GitHub
11
- */
12
- authenticate(): Promise<boolean>;
13
- get isAuthenticated(): boolean;
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 interface IssueDetails {
121
- title: string;
122
- body: string;
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=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