hub-launch 1.0.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/CHANGELOG.md +144 -0
- package/README.md +195 -0
- package/bin/hublaunch +20 -0
- package/dist/commands/checkout.d.ts +7 -0
- package/dist/commands/checkout.d.ts.map +1 -0
- package/dist/commands/checkout.js +164 -0
- package/dist/commands/checkout.js.map +1 -0
- package/dist/commands/clean.d.ts +7 -0
- package/dist/commands/clean.d.ts.map +1 -0
- package/dist/commands/clean.js +206 -0
- package/dist/commands/clean.js.map +1 -0
- package/dist/commands/close.d.ts +7 -0
- package/dist/commands/close.d.ts.map +1 -0
- package/dist/commands/close.js +109 -0
- package/dist/commands/close.js.map +1 -0
- package/dist/commands/create.d.ts +7 -0
- package/dist/commands/create.d.ts.map +1 -0
- package/dist/commands/create.js +367 -0
- package/dist/commands/create.js.map +1 -0
- package/dist/commands/diff.d.ts +7 -0
- package/dist/commands/diff.d.ts.map +1 -0
- package/dist/commands/diff.js +98 -0
- package/dist/commands/diff.js.map +1 -0
- package/dist/commands/execute.d.ts +7 -0
- package/dist/commands/execute.d.ts.map +1 -0
- package/dist/commands/execute.js +376 -0
- package/dist/commands/execute.js.map +1 -0
- package/dist/commands/init.d.ts +8 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +1243 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/interactive.d.ts +12 -0
- package/dist/commands/interactive.d.ts.map +1 -0
- package/dist/commands/interactive.js +1071 -0
- package/dist/commands/interactive.js.map +1 -0
- package/dist/commands/launch.d.ts +16 -0
- package/dist/commands/launch.d.ts.map +1 -0
- package/dist/commands/launch.js +684 -0
- package/dist/commands/launch.js.map +1 -0
- package/dist/commands/login.d.ts +40 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +469 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logs.d.ts +22 -0
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/logs.js +105 -0
- package/dist/commands/logs.js.map +1 -0
- package/dist/commands/merge.d.ts +7 -0
- package/dist/commands/merge.d.ts.map +1 -0
- package/dist/commands/merge.js +240 -0
- package/dist/commands/merge.js.map +1 -0
- package/dist/commands/preview.d.ts +7 -0
- package/dist/commands/preview.d.ts.map +1 -0
- package/dist/commands/preview.js +160 -0
- package/dist/commands/preview.js.map +1 -0
- package/dist/commands/project.d.ts +18 -0
- package/dist/commands/project.d.ts.map +1 -0
- package/dist/commands/project.js +352 -0
- package/dist/commands/project.js.map +1 -0
- package/dist/commands/respond.d.ts +7 -0
- package/dist/commands/respond.d.ts.map +1 -0
- package/dist/commands/respond.js +112 -0
- package/dist/commands/respond.js.map +1 -0
- package/dist/commands/setPriority.d.ts +7 -0
- package/dist/commands/setPriority.d.ts.map +1 -0
- package/dist/commands/setPriority.js +112 -0
- package/dist/commands/setPriority.js.map +1 -0
- package/dist/commands/track.d.ts +7 -0
- package/dist/commands/track.d.ts.map +1 -0
- package/dist/commands/track.js +140 -0
- package/dist/commands/track.js.map +1 -0
- package/dist/commands/upload.d.ts +21 -0
- package/dist/commands/upload.d.ts.map +1 -0
- package/dist/commands/upload.js +145 -0
- package/dist/commands/upload.js.map +1 -0
- package/dist/commands/view.d.ts +7 -0
- package/dist/commands/view.d.ts.map +1 -0
- package/dist/commands/view.js +168 -0
- package/dist/commands/view.js.map +1 -0
- package/dist/commands/watch.d.ts +7 -0
- package/dist/commands/watch.d.ts.map +1 -0
- package/dist/commands/watch.js +438 -0
- package/dist/commands/watch.js.map +1 -0
- package/dist/commands/worktree.d.ts +7 -0
- package/dist/commands/worktree.d.ts.map +1 -0
- package/dist/commands/worktree.js +122 -0
- package/dist/commands/worktree.js.map +1 -0
- package/dist/config/command-names.d.ts +16 -0
- package/dist/config/command-names.d.ts.map +1 -0
- package/dist/config/command-names.js +17 -0
- package/dist/config/command-names.js.map +1 -0
- package/dist/config/constants.d.ts +12 -0
- package/dist/config/constants.d.ts.map +1 -0
- package/dist/config/constants.js +12 -0
- package/dist/config/constants.js.map +1 -0
- package/dist/config/index.d.ts +47 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +175 -0
- package/dist/config/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +148 -0
- package/dist/index.js.map +1 -0
- package/dist/services/api/HulaApiClient.d.ts +170 -0
- package/dist/services/api/HulaApiClient.d.ts.map +1 -0
- package/dist/services/api/HulaApiClient.js +233 -0
- package/dist/services/api/HulaApiClient.js.map +1 -0
- package/dist/services/diff/DiffService.d.ts +44 -0
- package/dist/services/diff/DiffService.d.ts.map +1 -0
- package/dist/services/diff/DiffService.js +126 -0
- package/dist/services/diff/DiffService.js.map +1 -0
- package/dist/services/editor/EditorService.d.ts +53 -0
- package/dist/services/editor/EditorService.d.ts.map +1 -0
- package/dist/services/editor/EditorService.js +161 -0
- package/dist/services/editor/EditorService.js.map +1 -0
- package/dist/services/git/GitService.d.ts +124 -0
- package/dist/services/git/GitService.d.ts.map +1 -0
- package/dist/services/git/GitService.js +423 -0
- package/dist/services/git/GitService.js.map +1 -0
- package/dist/services/git/WorktreeService.d.ts +144 -0
- package/dist/services/git/WorktreeService.d.ts.map +1 -0
- package/dist/services/git/WorktreeService.js +505 -0
- package/dist/services/git/WorktreeService.js.map +1 -0
- package/dist/services/github/ActionsService.d.ts +66 -0
- package/dist/services/github/ActionsService.d.ts.map +1 -0
- package/dist/services/github/ActionsService.js +114 -0
- package/dist/services/github/ActionsService.js.map +1 -0
- package/dist/services/github/AssetUploadService.d.ts +103 -0
- package/dist/services/github/AssetUploadService.d.ts.map +1 -0
- package/dist/services/github/AssetUploadService.js +299 -0
- package/dist/services/github/AssetUploadService.js.map +1 -0
- package/dist/services/github/BatchCopilotDetectionService.d.ts +58 -0
- package/dist/services/github/BatchCopilotDetectionService.d.ts.map +1 -0
- package/dist/services/github/BatchCopilotDetectionService.js +321 -0
- package/dist/services/github/BatchCopilotDetectionService.js.map +1 -0
- package/dist/services/github/CopilotDetectionService.d.ts +40 -0
- package/dist/services/github/CopilotDetectionService.d.ts.map +1 -0
- package/dist/services/github/CopilotDetectionService.js +280 -0
- package/dist/services/github/CopilotDetectionService.js.map +1 -0
- package/dist/services/github/CopilotService.d.ts +27 -0
- package/dist/services/github/CopilotService.d.ts.map +1 -0
- package/dist/services/github/CopilotService.js +249 -0
- package/dist/services/github/CopilotService.js.map +1 -0
- package/dist/services/github/DeploymentDetectionService.d.ts +38 -0
- package/dist/services/github/DeploymentDetectionService.d.ts.map +1 -0
- package/dist/services/github/DeploymentDetectionService.js +104 -0
- package/dist/services/github/DeploymentDetectionService.js.map +1 -0
- package/dist/services/github/GithubAppService.d.ts +40 -0
- package/dist/services/github/GithubAppService.d.ts.map +1 -0
- package/dist/services/github/GithubAppService.js +187 -0
- package/dist/services/github/GithubAppService.js.map +1 -0
- package/dist/services/github/IssueService.d.ts +65 -0
- package/dist/services/github/IssueService.d.ts.map +1 -0
- package/dist/services/github/IssueService.js +231 -0
- package/dist/services/github/IssueService.js.map +1 -0
- package/dist/services/github/LabelService.d.ts +36 -0
- package/dist/services/github/LabelService.d.ts.map +1 -0
- package/dist/services/github/LabelService.js +122 -0
- package/dist/services/github/LabelService.js.map +1 -0
- package/dist/services/github/PRService.d.ts +77 -0
- package/dist/services/github/PRService.d.ts.map +1 -0
- package/dist/services/github/PRService.js +287 -0
- package/dist/services/github/PRService.js.map +1 -0
- package/dist/services/github/ProjectService.d.ts +144 -0
- package/dist/services/github/ProjectService.d.ts.map +1 -0
- package/dist/services/github/ProjectService.js +804 -0
- package/dist/services/github/ProjectService.js.map +1 -0
- package/dist/services/hooks/HookExecutor.d.ts +66 -0
- package/dist/services/hooks/HookExecutor.d.ts.map +1 -0
- package/dist/services/hooks/HookExecutor.js +227 -0
- package/dist/services/hooks/HookExecutor.js.map +1 -0
- package/dist/services/hooks/index.d.ts +2 -0
- package/dist/services/hooks/index.d.ts.map +1 -0
- package/dist/services/hooks/index.js +2 -0
- package/dist/services/hooks/index.js.map +1 -0
- package/dist/services/logs/LogFormatterService.d.ts +17 -0
- package/dist/services/logs/LogFormatterService.d.ts.map +1 -0
- package/dist/services/logs/LogFormatterService.js +35 -0
- package/dist/services/logs/LogFormatterService.js.map +1 -0
- package/dist/services/logs/TempFileService.d.ts +27 -0
- package/dist/services/logs/TempFileService.d.ts.map +1 -0
- package/dist/services/logs/TempFileService.js +90 -0
- package/dist/services/logs/TempFileService.js.map +1 -0
- package/dist/services/logs/index.d.ts +3 -0
- package/dist/services/logs/index.d.ts.map +1 -0
- package/dist/services/logs/index.js +4 -0
- package/dist/services/logs/index.js.map +1 -0
- package/dist/services/plan/PlanService.d.ts +70 -0
- package/dist/services/plan/PlanService.d.ts.map +1 -0
- package/dist/services/plan/PlanService.js +211 -0
- package/dist/services/plan/PlanService.js.map +1 -0
- package/dist/services/polling/GitHubDirectPollingAdapter.d.ts +16 -0
- package/dist/services/polling/GitHubDirectPollingAdapter.d.ts.map +1 -0
- package/dist/services/polling/GitHubDirectPollingAdapter.js +87 -0
- package/dist/services/polling/GitHubDirectPollingAdapter.js.map +1 -0
- package/dist/services/polling/HulaServerPollingAdapter.d.ts +23 -0
- package/dist/services/polling/HulaServerPollingAdapter.d.ts.map +1 -0
- package/dist/services/polling/HulaServerPollingAdapter.js +78 -0
- package/dist/services/polling/HulaServerPollingAdapter.js.map +1 -0
- package/dist/services/polling/IStatusPollingAdapter.d.ts +29 -0
- package/dist/services/polling/IStatusPollingAdapter.d.ts.map +1 -0
- package/dist/services/polling/IStatusPollingAdapter.js +2 -0
- package/dist/services/polling/IStatusPollingAdapter.js.map +1 -0
- package/dist/services/polling/StatusPollingAdapterFactory.d.ts +14 -0
- package/dist/services/polling/StatusPollingAdapterFactory.d.ts.map +1 -0
- package/dist/services/polling/StatusPollingAdapterFactory.js +41 -0
- package/dist/services/polling/StatusPollingAdapterFactory.js.map +1 -0
- package/dist/services/polling/index.d.ts +5 -0
- package/dist/services/polling/index.d.ts.map +1 -0
- package/dist/services/polling/index.js +5 -0
- package/dist/services/polling/index.js.map +1 -0
- package/dist/services/preview/PreviewService.d.ts +86 -0
- package/dist/services/preview/PreviewService.d.ts.map +1 -0
- package/dist/services/preview/PreviewService.js +439 -0
- package/dist/services/preview/PreviewService.js.map +1 -0
- package/dist/services/tracking/ProjectTrackingAdapter.d.ts +41 -0
- package/dist/services/tracking/ProjectTrackingAdapter.d.ts.map +1 -0
- package/dist/services/tracking/ProjectTrackingAdapter.js +230 -0
- package/dist/services/tracking/ProjectTrackingAdapter.js.map +1 -0
- package/dist/services/tracking/RemoteTrackingAdapter.d.ts +62 -0
- package/dist/services/tracking/RemoteTrackingAdapter.d.ts.map +1 -0
- package/dist/services/tracking/RemoteTrackingAdapter.js +242 -0
- package/dist/services/tracking/RemoteTrackingAdapter.js.map +1 -0
- package/dist/services/tracking/TrackingAdapterFactory.d.ts +25 -0
- package/dist/services/tracking/TrackingAdapterFactory.d.ts.map +1 -0
- package/dist/services/tracking/TrackingAdapterFactory.js +55 -0
- package/dist/services/tracking/TrackingAdapterFactory.js.map +1 -0
- package/dist/services/tracking/TrackingService.d.ts +104 -0
- package/dist/services/tracking/TrackingService.d.ts.map +1 -0
- package/dist/services/tracking/TrackingService.js +256 -0
- package/dist/services/tracking/TrackingService.js.map +1 -0
- package/dist/services/tracking/UntrackedIssuesService.d.ts +20 -0
- package/dist/services/tracking/UntrackedIssuesService.d.ts.map +1 -0
- package/dist/services/tracking/UntrackedIssuesService.js +148 -0
- package/dist/services/tracking/UntrackedIssuesService.js.map +1 -0
- package/dist/services/tracking/local-file-migration.d.ts +16 -0
- package/dist/services/tracking/local-file-migration.d.ts.map +1 -0
- package/dist/services/tracking/local-file-migration.js +86 -0
- package/dist/services/tracking/local-file-migration.js.map +1 -0
- package/dist/templates/planning-instructions.md +752 -0
- package/dist/templates/proceed-instructions.md +453 -0
- package/dist/templates/scripts/hula-fix-commit.sh +110 -0
- package/dist/templates/scripts/hula-fix-setup.sh +145 -0
- package/dist/templates/scripts/hula-launch-run.sh +89 -0
- package/dist/templates/scripts/hula-merge-local.sh +138 -0
- package/dist/templates/scripts/hula-merge-remote.sh +74 -0
- package/dist/templates/scripts/hula-read-config.sh +38 -0
- package/dist/templates/scripts/hula-verify-gather.sh +135 -0
- package/dist/templates/scripts/hula-verify-post.sh +84 -0
- package/dist/templates/skills/hula-confirm/SKILL.md +361 -0
- package/dist/templates/skills/hula-create/SKILL.md +211 -0
- package/dist/templates/skills/hula-fix/SKILL.md +224 -0
- package/dist/templates/skills/hula-launch/SKILL.md +159 -0
- package/dist/templates/skills/hula-log/SKILL.md +105 -0
- package/dist/templates/skills/hula-merge/SKILL.md +387 -0
- package/dist/templates/skills/hula-plan/SKILL.md +148 -0
- package/dist/templates/skills/hula-upload/SKILL.md +115 -0
- package/dist/templates/skills/hula-verify/SKILL.md +754 -0
- package/dist/types/common.schema.d.ts +46 -0
- package/dist/types/common.schema.d.ts.map +1 -0
- package/dist/types/common.schema.js +60 -0
- package/dist/types/common.schema.js.map +1 -0
- package/dist/types/config.schema.d.ts +443 -0
- package/dist/types/config.schema.d.ts.map +1 -0
- package/dist/types/config.schema.js +126 -0
- package/dist/types/config.schema.js.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +7 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/issue.schema.d.ts +136 -0
- package/dist/types/issue.schema.d.ts.map +1 -0
- package/dist/types/issue.schema.js +49 -0
- package/dist/types/issue.schema.js.map +1 -0
- package/dist/types/pr.schema.d.ts +118 -0
- package/dist/types/pr.schema.d.ts.map +1 -0
- package/dist/types/pr.schema.js +40 -0
- package/dist/types/pr.schema.js.map +1 -0
- package/dist/types/tracking.schema.d.ts +340 -0
- package/dist/types/tracking.schema.d.ts.map +1 -0
- package/dist/types/tracking.schema.js +56 -0
- package/dist/types/tracking.schema.js.map +1 -0
- package/dist/utils/browser-launcher.d.ts +60 -0
- package/dist/utils/browser-launcher.d.ts.map +1 -0
- package/dist/utils/browser-launcher.js +263 -0
- package/dist/utils/browser-launcher.js.map +1 -0
- package/dist/utils/cache.d.ts +44 -0
- package/dist/utils/cache.d.ts.map +1 -0
- package/dist/utils/cache.js +94 -0
- package/dist/utils/cache.js.map +1 -0
- package/dist/utils/config-parser.d.ts +16 -0
- package/dist/utils/config-parser.d.ts.map +1 -0
- package/dist/utils/config-parser.js +210 -0
- package/dist/utils/config-parser.js.map +1 -0
- package/dist/utils/editor.d.ts +21 -0
- package/dist/utils/editor.d.ts.map +1 -0
- package/dist/utils/editor.js +213 -0
- package/dist/utils/editor.js.map +1 -0
- package/dist/utils/git-utils.d.ts +5 -0
- package/dist/utils/git-utils.d.ts.map +1 -0
- package/dist/utils/git-utils.js +18 -0
- package/dist/utils/git-utils.js.map +1 -0
- package/dist/utils/github-cli.d.ts +62 -0
- package/dist/utils/github-cli.d.ts.map +1 -0
- package/dist/utils/github-cli.js +492 -0
- package/dist/utils/github-cli.js.map +1 -0
- package/dist/utils/logger.d.ts +45 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +118 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/open-url.d.ts +19 -0
- package/dist/utils/open-url.d.ts.map +1 -0
- package/dist/utils/open-url.js +37 -0
- package/dist/utils/open-url.js.map +1 -0
- package/dist/utils/project-resolver.d.ts +13 -0
- package/dist/utils/project-resolver.d.ts.map +1 -0
- package/dist/utils/project-resolver.js +35 -0
- package/dist/utils/project-resolver.js.map +1 -0
- package/dist/utils/prompts.d.ts +80 -0
- package/dist/utils/prompts.d.ts.map +1 -0
- package/dist/utils/prompts.js +326 -0
- package/dist/utils/prompts.js.map +1 -0
- package/dist/utils/shell.d.ts +54 -0
- package/dist/utils/shell.d.ts.map +1 -0
- package/dist/utils/shell.js +152 -0
- package/dist/utils/shell.js.map +1 -0
- package/dist/utils/validators.d.ts +32 -0
- package/dist/utils/validators.d.ts.map +1 -0
- package/dist/utils/validators.js +64 -0
- package/dist/utils/validators.js.map +1 -0
- package/package.json +73 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service for Git operations
|
|
3
|
+
* Single Responsibility: Local git repository operations
|
|
4
|
+
*/
|
|
5
|
+
export declare class GitService {
|
|
6
|
+
/**
|
|
7
|
+
* Get current git branch
|
|
8
|
+
*/
|
|
9
|
+
getCurrentBranch(): Promise<string>;
|
|
10
|
+
/**
|
|
11
|
+
* Checkout a branch
|
|
12
|
+
*/
|
|
13
|
+
checkout(branch: string): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Create a new branch
|
|
16
|
+
*/
|
|
17
|
+
createBranch(name: string, startPoint?: string): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Delete a local branch
|
|
20
|
+
*/
|
|
21
|
+
deleteBranch(branch: string, force?: boolean): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Check if working directory is clean (no uncommitted changes)
|
|
24
|
+
*/
|
|
25
|
+
isClean(): Promise<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* Merge a branch into current branch
|
|
28
|
+
*/
|
|
29
|
+
merge(source: string, options?: {
|
|
30
|
+
noFf?: boolean;
|
|
31
|
+
squash?: boolean;
|
|
32
|
+
}): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Fetch from remote
|
|
35
|
+
*/
|
|
36
|
+
fetch(remote?: string, branch?: string): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Pull from remote
|
|
39
|
+
*/
|
|
40
|
+
pull(remote?: string, branch?: string): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Push to remote
|
|
43
|
+
*/
|
|
44
|
+
push(branch?: string, remote?: string, force?: boolean): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Check if a branch exists locally
|
|
47
|
+
*/
|
|
48
|
+
branchExists(branch: string): Promise<boolean>;
|
|
49
|
+
/**
|
|
50
|
+
* Check if a remote branch exists
|
|
51
|
+
*/
|
|
52
|
+
remoteBranchExists(branch: string, remote?: string): Promise<boolean>;
|
|
53
|
+
/**
|
|
54
|
+
* Get list of changed files
|
|
55
|
+
*/
|
|
56
|
+
getChangedFiles(): Promise<string[]>;
|
|
57
|
+
/**
|
|
58
|
+
* Check if we're in a git repository
|
|
59
|
+
*/
|
|
60
|
+
isGitRepo(): Promise<boolean>;
|
|
61
|
+
/**
|
|
62
|
+
* Get repository root directory
|
|
63
|
+
*/
|
|
64
|
+
getRepoRoot(): Promise<string>;
|
|
65
|
+
/**
|
|
66
|
+
* Remove a file from the git index only (keeps file on disk)
|
|
67
|
+
*/
|
|
68
|
+
rmCached(filePath: string): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Reset a file in the index to match HEAD (unstages changes for that file)
|
|
71
|
+
*/
|
|
72
|
+
resetFile(filePath: string): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* Stash current changes with a message
|
|
75
|
+
*/
|
|
76
|
+
stash(message?: string): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* Stash current changes including untracked files
|
|
79
|
+
*/
|
|
80
|
+
stashIncludingUntracked(message?: string): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Count the number of stash entries
|
|
83
|
+
*/
|
|
84
|
+
stashCount(): Promise<number>;
|
|
85
|
+
/**
|
|
86
|
+
* Pop the most recent stash
|
|
87
|
+
*/
|
|
88
|
+
stashPop(): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* Checkout a file from another branch/ref into the working tree
|
|
91
|
+
*/
|
|
92
|
+
checkoutFileFromRef(ref: string, filePath: string): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Stage a specific file
|
|
95
|
+
*/
|
|
96
|
+
addFile(filePath: string): Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* Create a commit with the given message
|
|
99
|
+
*/
|
|
100
|
+
commit(message: string): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* Push to remote with --no-verify flag (skips git push hooks)
|
|
103
|
+
*/
|
|
104
|
+
pushNoVerify(branch: string, remote?: string): Promise<void>;
|
|
105
|
+
/**
|
|
106
|
+
* Check if a file exists on a given git ref (branch, tag, or commit)
|
|
107
|
+
*/
|
|
108
|
+
fileExistsOnRef(ref: string, relativePath: string): Promise<boolean>;
|
|
109
|
+
/**
|
|
110
|
+
* Check if local branch is behind remote
|
|
111
|
+
*/
|
|
112
|
+
isBehindRemote(branch: string, remote?: string): Promise<boolean>;
|
|
113
|
+
/**
|
|
114
|
+
* Get remote repository information (owner and repo name)
|
|
115
|
+
* Parses the git remote URL to extract GitHub owner/repo
|
|
116
|
+
* @param remote - The remote name (default: "origin")
|
|
117
|
+
* @returns Object with owner and repo, or null if not a valid GitHub remote
|
|
118
|
+
*/
|
|
119
|
+
getRemoteRepository(remote?: string): Promise<{
|
|
120
|
+
owner: string;
|
|
121
|
+
repo: string;
|
|
122
|
+
} | null>;
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=GitService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GitService.d.ts","sourceRoot":"","sources":["../../../src/services/git/GitService.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,qBAAa,UAAU;IACrB;;OAEG;IACG,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC;IAUzC;;OAEG;IACG,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAY7C;;OAEG;IACG,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAepE;;OAEG;IACG,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAahE;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC;IAcjC;;OAEG;IACG,KAAK,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G;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAY/B;;OAEG;IACG,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAYvE;;OAEG;IACG,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAY9C;;OAEG;IACG,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAY5C;;OAEG;IACG,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,SAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAYpE;;OAEG;IACG,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAsB1E;;OAEG;IACG,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,SAAW,GAAG,OAAO,CAAC,OAAO,CAAC;IAuBzE;;;;;OAKG;IACG,mBAAmB,CACvB,MAAM,SAAW,GAChB,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CAoCnD"}
|
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
import { runCommand, runCommandDetailed } from '../../utils/shell.js';
|
|
2
|
+
import { logger } from '../../utils/logger.js';
|
|
3
|
+
/**
|
|
4
|
+
* Service for Git operations
|
|
5
|
+
* Single Responsibility: Local git repository operations
|
|
6
|
+
*/
|
|
7
|
+
export class GitService {
|
|
8
|
+
/**
|
|
9
|
+
* Get current git branch
|
|
10
|
+
*/
|
|
11
|
+
async getCurrentBranch() {
|
|
12
|
+
try {
|
|
13
|
+
return await runCommand('git rev-parse --abbrev-ref HEAD');
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
throw new Error(`Failed to get current branch: ${error instanceof Error ? error.message : String(error)}`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Checkout a branch
|
|
21
|
+
*/
|
|
22
|
+
async checkout(branch) {
|
|
23
|
+
logger.debug(`Checking out branch: ${branch}`);
|
|
24
|
+
try {
|
|
25
|
+
await runCommand(`git checkout ${branch}`);
|
|
26
|
+
logger.debug(`Successfully checked out branch: ${branch}`);
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
throw new Error(`Failed to checkout branch ${branch}: ${error instanceof Error ? error.message : String(error)}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Create a new branch
|
|
34
|
+
*/
|
|
35
|
+
async createBranch(name, startPoint) {
|
|
36
|
+
logger.debug(`Creating branch: ${name}`);
|
|
37
|
+
try {
|
|
38
|
+
const cmd = startPoint
|
|
39
|
+
? `git checkout -b ${name} ${startPoint}`
|
|
40
|
+
: `git checkout -b ${name}`;
|
|
41
|
+
await runCommand(cmd);
|
|
42
|
+
logger.debug(`Successfully created branch: ${name}`);
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
throw new Error(`Failed to create branch ${name}: ${error instanceof Error ? error.message : String(error)}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Delete a local branch
|
|
50
|
+
*/
|
|
51
|
+
async deleteBranch(branch, force = false) {
|
|
52
|
+
logger.debug(`Deleting branch: ${branch}`);
|
|
53
|
+
try {
|
|
54
|
+
const flag = force ? '-D' : '-d';
|
|
55
|
+
await runCommand(`git branch ${flag} ${branch}`);
|
|
56
|
+
logger.debug(`Successfully deleted branch: ${branch}`);
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
throw new Error(`Failed to delete branch ${branch}: ${error instanceof Error ? error.message : String(error)}`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Check if working directory is clean (no uncommitted changes)
|
|
64
|
+
*/
|
|
65
|
+
async isClean() {
|
|
66
|
+
try {
|
|
67
|
+
const status = await runCommand('git status --porcelain', {
|
|
68
|
+
silent: true,
|
|
69
|
+
});
|
|
70
|
+
return status.trim() === '';
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
logger.debug(`Failed to check git status: ${error instanceof Error ? error.message : String(error)}`);
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Merge a branch into current branch
|
|
79
|
+
*/
|
|
80
|
+
async merge(source, options = {}) {
|
|
81
|
+
logger.debug(`Merging ${source} into current branch`);
|
|
82
|
+
try {
|
|
83
|
+
const flags = [];
|
|
84
|
+
if (options.noFf)
|
|
85
|
+
flags.push('--no-ff');
|
|
86
|
+
if (options.squash)
|
|
87
|
+
flags.push('--squash');
|
|
88
|
+
const cmd = `git merge ${flags.join(' ')} ${source}`;
|
|
89
|
+
await runCommand(cmd);
|
|
90
|
+
logger.debug(`Successfully merged ${source}`);
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
throw new Error(`Failed to merge ${source}: ${error instanceof Error ? error.message : String(error)}`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Fetch from remote
|
|
98
|
+
*/
|
|
99
|
+
async fetch(remote = 'origin', branch) {
|
|
100
|
+
logger.debug(`Fetching from ${remote}${branch ? ` (${branch})` : ''}`);
|
|
101
|
+
try {
|
|
102
|
+
const cmd = branch
|
|
103
|
+
? `git fetch ${remote} ${branch}`
|
|
104
|
+
: `git fetch ${remote}`;
|
|
105
|
+
await runCommand(cmd);
|
|
106
|
+
logger.debug('Successfully fetched from remote');
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
throw new Error(`Failed to fetch from ${remote}: ${error instanceof Error ? error.message : String(error)}`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Pull from remote
|
|
114
|
+
*/
|
|
115
|
+
async pull(remote = 'origin', branch) {
|
|
116
|
+
logger.debug(`Pulling from ${remote}${branch ? ` (${branch})` : ''}`);
|
|
117
|
+
try {
|
|
118
|
+
const cmd = branch
|
|
119
|
+
? `git pull ${remote} ${branch}`
|
|
120
|
+
: `git pull ${remote}`;
|
|
121
|
+
await runCommand(cmd);
|
|
122
|
+
logger.debug('Successfully pulled from remote');
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
throw new Error(`Failed to pull from ${remote}: ${error instanceof Error ? error.message : String(error)}`);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Push to remote
|
|
130
|
+
*/
|
|
131
|
+
async push(branch, remote = 'origin', force = false) {
|
|
132
|
+
const targetBranch = branch ?? (await this.getCurrentBranch());
|
|
133
|
+
logger.debug(`Pushing ${targetBranch} to ${remote}`);
|
|
134
|
+
try {
|
|
135
|
+
const forceFlag = force ? ' --force' : '';
|
|
136
|
+
const cmd = `git push ${remote} ${targetBranch}${forceFlag}`;
|
|
137
|
+
await runCommand(cmd);
|
|
138
|
+
logger.debug(`Successfully pushed ${targetBranch} to ${remote}`);
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
throw new Error(`Failed to push ${targetBranch} to ${remote}: ${error instanceof Error ? error.message : String(error)}`);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Check if a branch exists locally
|
|
146
|
+
*/
|
|
147
|
+
async branchExists(branch) {
|
|
148
|
+
try {
|
|
149
|
+
const result = await runCommandDetailed(`git rev-parse --verify ${branch}`, {});
|
|
150
|
+
return result.exitCode === 0;
|
|
151
|
+
}
|
|
152
|
+
catch {
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Check if a remote branch exists
|
|
158
|
+
*/
|
|
159
|
+
async remoteBranchExists(branch, remote = 'origin') {
|
|
160
|
+
try {
|
|
161
|
+
const result = await runCommandDetailed(`git ls-remote --heads ${remote} ${branch}`, {});
|
|
162
|
+
return result.exitCode === 0 && result.stdout.trim() !== '';
|
|
163
|
+
}
|
|
164
|
+
catch {
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Get list of changed files
|
|
170
|
+
*/
|
|
171
|
+
async getChangedFiles() {
|
|
172
|
+
try {
|
|
173
|
+
const output = await runCommand('git status --porcelain', {
|
|
174
|
+
silent: true,
|
|
175
|
+
});
|
|
176
|
+
return output
|
|
177
|
+
.split('\n')
|
|
178
|
+
.filter((line) => line.trim() !== '')
|
|
179
|
+
.map((line) => line.substring(3).trim());
|
|
180
|
+
}
|
|
181
|
+
catch (error) {
|
|
182
|
+
logger.debug(`Failed to get changed files: ${error instanceof Error ? error.message : String(error)}`);
|
|
183
|
+
return [];
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Check if we're in a git repository
|
|
188
|
+
*/
|
|
189
|
+
async isGitRepo() {
|
|
190
|
+
try {
|
|
191
|
+
await runCommand('git rev-parse --git-dir', { silent: true });
|
|
192
|
+
return true;
|
|
193
|
+
}
|
|
194
|
+
catch {
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Get repository root directory
|
|
200
|
+
*/
|
|
201
|
+
async getRepoRoot() {
|
|
202
|
+
return runCommand('git rev-parse --show-toplevel');
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Remove a file from the git index only (keeps file on disk)
|
|
206
|
+
*/
|
|
207
|
+
async rmCached(filePath) {
|
|
208
|
+
logger.debug(`Removing from index: ${filePath}`);
|
|
209
|
+
try {
|
|
210
|
+
await runCommand(`git rm --cached ${JSON.stringify(filePath)}`);
|
|
211
|
+
logger.debug(`Successfully removed from index: ${filePath}`);
|
|
212
|
+
}
|
|
213
|
+
catch (error) {
|
|
214
|
+
throw new Error(`Failed to remove from index: ${error instanceof Error ? error.message : String(error)}`);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Reset a file in the index to match HEAD (unstages changes for that file)
|
|
219
|
+
*/
|
|
220
|
+
async resetFile(filePath) {
|
|
221
|
+
logger.debug(`Resetting index for: ${filePath}`);
|
|
222
|
+
try {
|
|
223
|
+
await runCommand(`git reset HEAD -- ${JSON.stringify(filePath)}`);
|
|
224
|
+
logger.debug(`Successfully reset index for: ${filePath}`);
|
|
225
|
+
}
|
|
226
|
+
catch (error) {
|
|
227
|
+
throw new Error(`Failed to reset file: ${error instanceof Error ? error.message : String(error)}`);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Stash current changes with a message
|
|
232
|
+
*/
|
|
233
|
+
async stash(message) {
|
|
234
|
+
logger.debug('Stashing changes');
|
|
235
|
+
try {
|
|
236
|
+
const cmd = message
|
|
237
|
+
? `git stash push -m ${JSON.stringify(message)}`
|
|
238
|
+
: 'git stash push';
|
|
239
|
+
await runCommand(cmd);
|
|
240
|
+
logger.debug('Successfully stashed changes');
|
|
241
|
+
}
|
|
242
|
+
catch (error) {
|
|
243
|
+
throw new Error(`Failed to stash changes: ${error instanceof Error ? error.message : String(error)}`);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Stash current changes including untracked files
|
|
248
|
+
*/
|
|
249
|
+
async stashIncludingUntracked(message) {
|
|
250
|
+
logger.debug('Stashing changes (including untracked)');
|
|
251
|
+
try {
|
|
252
|
+
const cmd = message
|
|
253
|
+
? `git stash push --include-untracked -m ${JSON.stringify(message)}`
|
|
254
|
+
: 'git stash push --include-untracked';
|
|
255
|
+
await runCommand(cmd);
|
|
256
|
+
logger.debug('Successfully stashed changes (including untracked)');
|
|
257
|
+
}
|
|
258
|
+
catch (error) {
|
|
259
|
+
throw new Error(`Failed to stash changes: ${error instanceof Error ? error.message : String(error)}`);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Count the number of stash entries
|
|
264
|
+
*/
|
|
265
|
+
async stashCount() {
|
|
266
|
+
logger.debug('Counting stash entries');
|
|
267
|
+
try {
|
|
268
|
+
const output = await runCommand('git stash list', { silent: true });
|
|
269
|
+
if (output.trim() === '')
|
|
270
|
+
return 0;
|
|
271
|
+
return output.trim().split('\n').length;
|
|
272
|
+
}
|
|
273
|
+
catch {
|
|
274
|
+
return 0;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Pop the most recent stash
|
|
279
|
+
*/
|
|
280
|
+
async stashPop() {
|
|
281
|
+
logger.debug('Popping stash');
|
|
282
|
+
try {
|
|
283
|
+
await runCommand('git stash pop');
|
|
284
|
+
logger.debug('Successfully popped stash');
|
|
285
|
+
}
|
|
286
|
+
catch (error) {
|
|
287
|
+
throw new Error(`Failed to pop stash: ${error instanceof Error ? error.message : String(error)}`);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Checkout a file from another branch/ref into the working tree
|
|
292
|
+
*/
|
|
293
|
+
async checkoutFileFromRef(ref, filePath) {
|
|
294
|
+
logger.debug(`Checking out ${filePath} from ${ref}`);
|
|
295
|
+
try {
|
|
296
|
+
await runCommand(`git checkout ${ref} -- ${JSON.stringify(filePath)}`);
|
|
297
|
+
logger.debug(`Successfully checked out ${filePath} from ${ref}`);
|
|
298
|
+
}
|
|
299
|
+
catch (error) {
|
|
300
|
+
throw new Error(`Failed to checkout ${filePath} from ${ref}: ${error instanceof Error ? error.message : String(error)}`);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Stage a specific file
|
|
305
|
+
*/
|
|
306
|
+
async addFile(filePath) {
|
|
307
|
+
logger.debug(`Staging file: ${filePath}`);
|
|
308
|
+
try {
|
|
309
|
+
await runCommand(`git add ${JSON.stringify(filePath)}`);
|
|
310
|
+
logger.debug(`Successfully staged file: ${filePath}`);
|
|
311
|
+
}
|
|
312
|
+
catch (error) {
|
|
313
|
+
throw new Error(`Failed to stage file ${filePath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Create a commit with the given message
|
|
318
|
+
*/
|
|
319
|
+
async commit(message) {
|
|
320
|
+
logger.debug(`Creating commit: ${message}`);
|
|
321
|
+
try {
|
|
322
|
+
await runCommand(`git commit -m ${JSON.stringify(message)}`);
|
|
323
|
+
logger.debug('Successfully created commit');
|
|
324
|
+
}
|
|
325
|
+
catch (error) {
|
|
326
|
+
throw new Error(`Failed to create commit: ${error instanceof Error ? error.message : String(error)}`);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Push to remote with --no-verify flag (skips git push hooks)
|
|
331
|
+
*/
|
|
332
|
+
async pushNoVerify(branch, remote = 'origin') {
|
|
333
|
+
logger.debug(`Pushing ${branch} to ${remote} (--no-verify)`);
|
|
334
|
+
try {
|
|
335
|
+
await runCommand(`git push --no-verify ${remote} ${branch}`);
|
|
336
|
+
logger.debug(`Successfully pushed ${branch} to ${remote} (--no-verify)`);
|
|
337
|
+
}
|
|
338
|
+
catch (error) {
|
|
339
|
+
throw new Error(`Failed to push ${branch} to ${remote}: ${error instanceof Error ? error.message : String(error)}`);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Check if a file exists on a given git ref (branch, tag, or commit)
|
|
344
|
+
*/
|
|
345
|
+
async fileExistsOnRef(ref, relativePath) {
|
|
346
|
+
// Validate ref and path to prevent command injection
|
|
347
|
+
if (!ref || ref.includes(';') || ref.includes('|') || ref.includes('&')) {
|
|
348
|
+
return false;
|
|
349
|
+
}
|
|
350
|
+
if (!relativePath ||
|
|
351
|
+
relativePath.includes(';') ||
|
|
352
|
+
relativePath.includes('|') ||
|
|
353
|
+
relativePath.includes('&')) {
|
|
354
|
+
return false;
|
|
355
|
+
}
|
|
356
|
+
try {
|
|
357
|
+
await runCommand(`git show ${ref}:${relativePath}`, { silent: true });
|
|
358
|
+
return true;
|
|
359
|
+
}
|
|
360
|
+
catch {
|
|
361
|
+
return false;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Check if local branch is behind remote
|
|
366
|
+
*/
|
|
367
|
+
async isBehindRemote(branch, remote = 'origin') {
|
|
368
|
+
try {
|
|
369
|
+
const local = await runCommand(`git rev-parse ${branch}`, {
|
|
370
|
+
silent: true,
|
|
371
|
+
});
|
|
372
|
+
const remoteRef = await runCommand(`git rev-parse ${remote}/${branch}`, {
|
|
373
|
+
silent: true,
|
|
374
|
+
});
|
|
375
|
+
if (local.trim() === remoteRef.trim()) {
|
|
376
|
+
return false; // Same commit
|
|
377
|
+
}
|
|
378
|
+
// Check if local is ancestor of remote (meaning local is behind)
|
|
379
|
+
const result = await runCommandDetailed(`git merge-base --is-ancestor ${branch} ${remote}/${branch}`);
|
|
380
|
+
return result.exitCode === 0;
|
|
381
|
+
}
|
|
382
|
+
catch {
|
|
383
|
+
return false; // Assume not behind if we can't determine
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Get remote repository information (owner and repo name)
|
|
388
|
+
* Parses the git remote URL to extract GitHub owner/repo
|
|
389
|
+
* @param remote - The remote name (default: "origin")
|
|
390
|
+
* @returns Object with owner and repo, or null if not a valid GitHub remote
|
|
391
|
+
*/
|
|
392
|
+
async getRemoteRepository(remote = 'origin') {
|
|
393
|
+
try {
|
|
394
|
+
const remoteUrl = await runCommand(`git remote get-url ${remote}`, {
|
|
395
|
+
silent: true,
|
|
396
|
+
});
|
|
397
|
+
const url = remoteUrl.trim();
|
|
398
|
+
// Handle SSH format: git@github.com:owner/repo.git
|
|
399
|
+
const sshMatch = url.match(/git@github\.com:([^/]+)\/(.+?)(?:\.git)?$/);
|
|
400
|
+
if (sshMatch && sshMatch[1] && sshMatch[2]) {
|
|
401
|
+
return {
|
|
402
|
+
owner: sshMatch[1],
|
|
403
|
+
repo: sshMatch[2].replace(/\.git$/, ''),
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
// Handle HTTPS format: https://github.com/owner/repo.git
|
|
407
|
+
const httpsMatch = url.match(/https?:\/\/github\.com\/([^/]+)\/(.+?)(?:\.git)?$/);
|
|
408
|
+
if (httpsMatch && httpsMatch[1] && httpsMatch[2]) {
|
|
409
|
+
return {
|
|
410
|
+
owner: httpsMatch[1],
|
|
411
|
+
repo: httpsMatch[2].replace(/\.git$/, ''),
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
logger.debug(`Unable to parse GitHub remote URL: ${url}`);
|
|
415
|
+
return null;
|
|
416
|
+
}
|
|
417
|
+
catch (error) {
|
|
418
|
+
logger.debug(`Failed to get remote URL: ${error instanceof Error ? error.message : String(error)}`);
|
|
419
|
+
return null;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
//# sourceMappingURL=GitService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GitService.js","sourceRoot":"","sources":["../../../src/services/git/GitService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C;;;GAGG;AACH,MAAM,OAAO,UAAU;IACrB;;OAEG;IACH,KAAK,CAAC,gBAAgB;QACpB,IAAI,CAAC;YACH,OAAO,MAAM,UAAU,CAAC,iCAAiC,CAAC,CAAC;QAC7D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CACb,iCAAiC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAC1F,CAAC;QACJ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