ya-git-jira 1.5.0 → 2.0.0
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/.opencode/skills/architecture/SKILL.md +45 -0
- package/.opencode/skills/code-style/SKILL.md +76 -0
- package/.opencode/skills/git-confluence/SKILL.md +82 -0
- package/.opencode/skills/git-jira/SKILL.md +63 -0
- package/.opencode/skills/git-lab/SKILL.md +102 -0
- package/AGENTS.md +50 -0
- package/README.md +121 -71
- package/bin/git-api.ts +70 -0
- package/bin/git-confluence-page-search.ts +58 -0
- package/bin/git-confluence-page-show.ts +61 -0
- package/bin/git-confluence-page-update.ts +77 -0
- package/bin/git-confluence-page.ts +28 -0
- package/bin/git-confluence-space-list.ts +34 -0
- package/bin/git-confluence-space.ts +24 -0
- package/bin/git-confluence-whoami.ts +33 -0
- package/bin/git-confluence.ts +27 -0
- package/bin/git-jira-start.ts +1 -1
- package/bin/git-jira-whoami.ts +32 -0
- package/bin/git-jira.ts +2 -0
- package/bin/git-lab-project-mr-list.ts +57 -0
- package/bin/git-lab-project-mr.ts +24 -0
- package/bin/git-lab-project-pipeline-jobs.ts +46 -0
- package/bin/git-lab-project-pipeline-latest.ts +47 -0
- package/bin/git-lab-project-pipeline-log.ts +49 -0
- package/bin/git-lab-project-pipeline.ts +6 -0
- package/bin/git-lab-project.ts +5 -1
- package/bin/gitj-install-skills.ts +126 -0
- package/bin/gitj.ts +12 -0
- package/dist/bin/git-api.js +2156 -0
- package/dist/bin/git-bump.js +136 -125
- package/dist/bin/git-confluence-page-search.js +2079 -0
- package/dist/bin/{git-lab-projects.js → git-confluence-page-show.js} +294 -250
- package/dist/bin/{git-lab-projects-whereami.js → git-confluence-page-update.js} +300 -206
- package/dist/bin/git-confluence-page.js +2186 -0
- package/dist/bin/{git-lab-groups.js → git-confluence-space-list.js} +279 -210
- package/dist/bin/git-confluence-space.js +2073 -0
- package/dist/bin/git-confluence-whoami.js +2060 -0
- package/dist/bin/git-confluence.js +2251 -0
- package/dist/bin/git-jira-issue-list.js +144 -129
- package/dist/bin/git-jira-issue-show.js +144 -129
- package/dist/bin/git-jira-issue.js +148 -133
- package/dist/bin/git-jira-start.js +146 -131
- package/dist/bin/{git-lab-namespaces.js → git-jira-whoami.js} +214 -226
- package/dist/bin/git-jira.js +178 -143
- package/dist/bin/git-lab-group-list.js +326 -394
- package/dist/bin/git-lab-group.js +328 -396
- package/dist/bin/git-lab-merge-active.js +326 -394
- package/dist/bin/git-lab-merge-todo.js +326 -394
- package/dist/bin/git-lab-merge-train-list.js +294 -388
- package/dist/bin/git-lab-merge-train.js +296 -390
- package/dist/bin/git-lab-merge.js +335 -403
- package/dist/bin/git-lab-namespace-list.js +145 -135
- package/dist/bin/git-lab-namespace.js +147 -137
- package/dist/bin/git-lab-project-list.js +293 -387
- package/dist/bin/git-lab-project-mr-list.js +2740 -0
- package/dist/bin/git-lab-project-mr.js +2752 -0
- package/dist/bin/git-lab-project-pipeline-jobs.js +2734 -0
- package/dist/bin/git-lab-project-pipeline-latest.js +2736 -0
- package/dist/bin/git-lab-project-pipeline-list.js +328 -396
- package/dist/bin/git-lab-project-pipeline-log.js +2739 -0
- package/dist/bin/git-lab-project-pipeline.js +442 -407
- package/dist/bin/git-lab-project-whereami.js +297 -391
- package/dist/bin/git-lab-project.js +568 -403
- package/dist/bin/git-lab-whoami.js +149 -139
- package/dist/bin/git-lab.js +581 -454
- package/dist/bin/{git-lab-projects-list.js → gitj-install-skills.js} +226 -268
- package/dist/bin/gitj.js +1384 -578
- package/dist/index.js +379 -300
- package/index.ts +1 -0
- package/lib/api.ts +177 -0
- package/lib/confluence/api.ts +132 -0
- package/lib/confluence/config.ts +25 -0
- package/lib/confluence/index.ts +3 -0
- package/lib/confluence/types.ts +59 -0
- package/lib/git.ts +3 -3
- package/lib/gitlab/config.ts +5 -5
- package/lib/gitlab/index.ts +1 -0
- package/lib/gitlab/job.ts +31 -0
- package/lib/gitlab/merge-request.ts +20 -0
- package/lib/gitlab/pipeline.ts +28 -1
- package/lib/gitlab/project.ts +14 -5
- package/lib/help.ts +40 -0
- package/lib/jira.ts +11 -6
- package/lib/spawn.ts +3 -3
- package/package.json +18 -2
- package/tests/all-help.test.ts +6 -1
- package/tests/gitj.test.ts +1 -1
- package/tests/help-all.test.ts +29 -0
- package/bun.lockb +0 -0
package/lib/spawn.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface SpawnOptions {
|
|
|
10
10
|
expectQuiet?: boolean
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
const defaultOptions: SpawnOptions = {
|
|
13
|
+
export const defaultOptions: SpawnOptions = {
|
|
14
14
|
expectQuiet: false,
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -29,8 +29,8 @@ export async function spawn(args: string[], options: SpawnOptions = defaultOptio
|
|
|
29
29
|
return { out: out.trim(), err: err.trim(), code }
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
export async function doCommand(args: string[]): Promise<string> {
|
|
33
|
-
const { out, err } = await spawn(args)
|
|
32
|
+
export async function doCommand(args: string[], options: SpawnOptions = defaultOptions): Promise<string> {
|
|
33
|
+
const { out, err } = await spawn(args, options)
|
|
34
34
|
if (err) console.error(err)
|
|
35
35
|
return out
|
|
36
36
|
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ya-git-jira",
|
|
3
3
|
"description": "git extensions for Jira integration. Assumes bun is installed.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
|
+
"git-api": "dist/bin/git-api.js",
|
|
8
9
|
"git-bump": "dist/bin/git-bump.js",
|
|
10
|
+
"git-confluence-page-search": "dist/bin/git-confluence-page-search.js",
|
|
11
|
+
"git-confluence-page-show": "dist/bin/git-confluence-page-show.js",
|
|
12
|
+
"git-confluence-page-update": "dist/bin/git-confluence-page-update.js",
|
|
13
|
+
"git-confluence-page": "dist/bin/git-confluence-page.js",
|
|
14
|
+
"git-confluence-space-list": "dist/bin/git-confluence-space-list.js",
|
|
15
|
+
"git-confluence-space": "dist/bin/git-confluence-space.js",
|
|
16
|
+
"git-confluence-whoami": "dist/bin/git-confluence-whoami.js",
|
|
17
|
+
"git-confluence": "dist/bin/git-confluence.js",
|
|
9
18
|
"git-jira-issue-list": "dist/bin/git-jira-issue-list.js",
|
|
10
19
|
"git-jira-issue-show": "dist/bin/git-jira-issue-show.js",
|
|
11
20
|
"git-jira-issue": "dist/bin/git-jira-issue.js",
|
|
12
21
|
"git-jira-start": "dist/bin/git-jira-start.js",
|
|
22
|
+
"git-jira-whoami": "dist/bin/git-jira-whoami.js",
|
|
13
23
|
"git-jira": "dist/bin/git-jira.js",
|
|
14
24
|
"git-lab-group-list": "dist/bin/git-lab-group-list.js",
|
|
15
25
|
"git-lab-group": "dist/bin/git-lab-group.js",
|
|
@@ -21,13 +31,19 @@
|
|
|
21
31
|
"git-lab-namespace-list": "dist/bin/git-lab-namespace-list.js",
|
|
22
32
|
"git-lab-namespace": "dist/bin/git-lab-namespace.js",
|
|
23
33
|
"git-lab-project-list": "dist/bin/git-lab-project-list.js",
|
|
34
|
+
"git-lab-project-mr": "dist/bin/git-lab-project-mr.js",
|
|
35
|
+
"git-lab-project-mr-list": "dist/bin/git-lab-project-mr-list.js",
|
|
24
36
|
"git-lab-project-pipeline": "dist/bin/git-lab-project-pipeline.js",
|
|
37
|
+
"git-lab-project-pipeline-jobs": "dist/bin/git-lab-project-pipeline-jobs.js",
|
|
38
|
+
"git-lab-project-pipeline-latest": "dist/bin/git-lab-project-pipeline-latest.js",
|
|
25
39
|
"git-lab-project-pipeline-list": "dist/bin/git-lab-project-pipeline-list.js",
|
|
40
|
+
"git-lab-project-pipeline-log": "dist/bin/git-lab-project-pipeline-log.js",
|
|
26
41
|
"git-lab-project-whereami": "dist/bin/git-lab-project-whereami.js",
|
|
27
42
|
"git-lab-project": "dist/bin/git-lab-project.js",
|
|
28
43
|
"git-lab-whoami": "dist/bin/git-lab-whoami.js",
|
|
29
44
|
"git-lab": "dist/bin/git-lab.js",
|
|
30
|
-
"gitj": "dist/bin/gitj.js"
|
|
45
|
+
"gitj": "dist/bin/gitj.js",
|
|
46
|
+
"gitj-install-skills": "dist/bin/gitj-install-skills.js"
|
|
31
47
|
},
|
|
32
48
|
"scripts": {
|
|
33
49
|
"preinstall": "bun run build.ts",
|
package/tests/all-help.test.ts
CHANGED
|
@@ -15,7 +15,12 @@ describe('bin scripts', () => {
|
|
|
15
15
|
|
|
16
16
|
describe('--help', () => {
|
|
17
17
|
scripts.forEach((script) => {
|
|
18
|
-
|
|
18
|
+
// Strip .ts, then remove the git-{service}- or gitj- prefix to get the command name.
|
|
19
|
+
// e.g. "git-jira-start" -> "start", "gitj-install-skills" -> "install-skills", "gitj" -> "gitj"
|
|
20
|
+
const base = script.replace(/\.ts$/, '')
|
|
21
|
+
const stem = base.startsWith('gitj-') ? base.slice('gitj-'.length)
|
|
22
|
+
: base === 'gitj' ? 'gitj'
|
|
23
|
+
: base.split('-').pop()!
|
|
19
24
|
test(`"${script} --help" should contain 'Usage: ${stem}'"`, async () => {
|
|
20
25
|
const output = await doCommand(['bun', 'run', `${binDir}/${script}`, '--help']);
|
|
21
26
|
expect(output).toContain(`Usage: ${stem}`);
|
package/tests/gitj.test.ts
CHANGED
|
@@ -9,7 +9,7 @@ test("testing works", async (): Promise<void> => {
|
|
|
9
9
|
test("gitj works", async (): Promise<void> => {
|
|
10
10
|
const { out, code }: SpawnResult = await spawn(["bun", "run", "bin/gitj.ts"])
|
|
11
11
|
expect(out).toMatch("Usage:")
|
|
12
|
-
expect(out).toMatch("Bump the version number
|
|
12
|
+
expect(out).toMatch("Bump the version number")
|
|
13
13
|
expect(out).toMatch("Commands for working with Jira")
|
|
14
14
|
expect(code).toBe(0)
|
|
15
15
|
})
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { describe, expect, test } from 'bun:test'
|
|
2
|
+
import { doCommand } from '..'
|
|
3
|
+
|
|
4
|
+
describe('--help-all', () => {
|
|
5
|
+
test('gitj --help-all prints the full command tree', async (): Promise<void> => {
|
|
6
|
+
const output = await doCommand(['bun', 'run', './bin/gitj.ts', '--help-all'])
|
|
7
|
+
// root
|
|
8
|
+
expect(output).toContain('gitj')
|
|
9
|
+
// top-level commands
|
|
10
|
+
expect(output).toContain('bump')
|
|
11
|
+
expect(output).toContain('confluence')
|
|
12
|
+
expect(output).toContain('jira')
|
|
13
|
+
expect(output).toContain('lab')
|
|
14
|
+
// deeply nested leaf commands
|
|
15
|
+
expect(output).toContain('search')
|
|
16
|
+
expect(output).toContain('whereami')
|
|
17
|
+
expect(output).toContain('train')
|
|
18
|
+
// tree-drawing characters
|
|
19
|
+
expect(output).toContain('├──')
|
|
20
|
+
expect(output).toContain('└──')
|
|
21
|
+
expect(output).toContain('│')
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
test('gitj --help-all includes descriptions', async (): Promise<void> => {
|
|
25
|
+
const output = await doCommand(['bun', 'run', './bin/gitj.ts', '--help-all'])
|
|
26
|
+
expect(output).toContain('Commands for working with Jira')
|
|
27
|
+
expect(output).toContain('Commands for working with GitLab')
|
|
28
|
+
})
|
|
29
|
+
})
|
package/bun.lockb
DELETED
|
Binary file
|