ya-git-jira 1.6.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.
Files changed (86) hide show
  1. package/.opencode/skills/architecture/SKILL.md +45 -0
  2. package/.opencode/skills/code-style/SKILL.md +76 -0
  3. package/.opencode/skills/git-confluence/SKILL.md +82 -0
  4. package/.opencode/skills/git-jira/SKILL.md +63 -0
  5. package/.opencode/skills/git-lab/SKILL.md +102 -0
  6. package/AGENTS.md +50 -0
  7. package/README.md +106 -106
  8. package/bin/git-api.ts +70 -0
  9. package/bin/git-confluence-page-search.ts +58 -0
  10. package/bin/git-confluence-page-show.ts +61 -0
  11. package/bin/git-confluence-page-update.ts +77 -0
  12. package/bin/git-confluence-page.ts +28 -0
  13. package/bin/git-confluence-space-list.ts +34 -0
  14. package/bin/git-confluence-space.ts +24 -0
  15. package/bin/git-confluence-whoami.ts +33 -0
  16. package/bin/git-confluence.ts +27 -0
  17. package/bin/git-jira-start.ts +1 -1
  18. package/bin/git-jira-whoami.ts +32 -0
  19. package/bin/git-jira.ts +2 -0
  20. package/bin/git-lab-project-mr-list.ts +57 -0
  21. package/bin/git-lab-project-mr.ts +24 -0
  22. package/bin/git-lab-project-pipeline-jobs.ts +46 -0
  23. package/bin/git-lab-project-pipeline-latest.ts +47 -0
  24. package/bin/git-lab-project-pipeline-log.ts +49 -0
  25. package/bin/git-lab-project-pipeline.ts +6 -0
  26. package/bin/git-lab-project.ts +5 -1
  27. package/bin/gitj-install-skills.ts +126 -0
  28. package/bin/gitj.ts +12 -0
  29. package/dist/bin/git-api.js +2156 -0
  30. package/dist/bin/git-bump.js +132 -121
  31. package/dist/bin/git-confluence-page-search.js +2079 -0
  32. package/dist/bin/git-confluence-page-show.js +2082 -0
  33. package/dist/bin/git-confluence-page-update.js +2093 -0
  34. package/dist/bin/git-confluence-page.js +2186 -0
  35. package/dist/bin/git-confluence-space-list.js +2061 -0
  36. package/dist/bin/git-confluence-space.js +2073 -0
  37. package/dist/bin/git-confluence-whoami.js +2060 -0
  38. package/dist/bin/git-confluence.js +2251 -0
  39. package/dist/bin/git-jira-issue-list.js +136 -125
  40. package/dist/bin/git-jira-issue-show.js +136 -125
  41. package/dist/bin/git-jira-issue.js +140 -129
  42. package/dist/bin/git-jira-start.js +138 -127
  43. package/dist/bin/git-jira-whoami.js +1972 -0
  44. package/dist/bin/git-jira.js +170 -139
  45. package/dist/bin/git-lab-group-list.js +321 -279
  46. package/dist/bin/git-lab-group.js +323 -281
  47. package/dist/bin/git-lab-merge-active.js +321 -279
  48. package/dist/bin/git-lab-merge-todo.js +321 -279
  49. package/dist/bin/git-lab-merge-train-list.js +289 -273
  50. package/dist/bin/git-lab-merge-train.js +291 -275
  51. package/dist/bin/git-lab-merge.js +330 -288
  52. package/dist/bin/git-lab-namespace-list.js +138 -127
  53. package/dist/bin/git-lab-namespace.js +140 -129
  54. package/dist/bin/git-lab-project-list.js +288 -272
  55. package/dist/bin/git-lab-project-mr-list.js +2740 -0
  56. package/dist/bin/git-lab-project-mr.js +2752 -0
  57. package/dist/bin/git-lab-project-pipeline-jobs.js +2734 -0
  58. package/dist/bin/git-lab-project-pipeline-latest.js +2736 -0
  59. package/dist/bin/git-lab-project-pipeline-list.js +323 -281
  60. package/dist/bin/git-lab-project-pipeline-log.js +2739 -0
  61. package/dist/bin/git-lab-project-pipeline.js +437 -292
  62. package/dist/bin/git-lab-project-whereami.js +292 -276
  63. package/dist/bin/git-lab-project.js +563 -288
  64. package/dist/bin/git-lab-whoami.js +142 -131
  65. package/dist/bin/git-lab.js +575 -338
  66. package/dist/bin/gitj-install-skills.js +1954 -0
  67. package/dist/bin/gitj.js +1385 -473
  68. package/dist/index.js +371 -187
  69. package/index.ts +1 -0
  70. package/lib/api.ts +177 -0
  71. package/lib/confluence/api.ts +132 -0
  72. package/lib/confluence/config.ts +25 -0
  73. package/lib/confluence/index.ts +3 -0
  74. package/lib/confluence/types.ts +59 -0
  75. package/lib/gitlab/index.ts +1 -0
  76. package/lib/gitlab/job.ts +31 -0
  77. package/lib/gitlab/merge-request.ts +20 -0
  78. package/lib/gitlab/pipeline.ts +28 -1
  79. package/lib/gitlab/project.ts +14 -5
  80. package/lib/help.ts +40 -0
  81. package/lib/jira.ts +2 -2
  82. package/package.json +18 -2
  83. package/tests/all-help.test.ts +6 -1
  84. package/tests/gitj.test.ts +1 -1
  85. package/tests/help-all.test.ts +29 -0
  86. package/bun.lockb +0 -0
@@ -15,7 +15,12 @@ describe('bin scripts', () => {
15
15
 
16
16
  describe('--help', () => {
17
17
  scripts.forEach((script) => {
18
- const stem = script.split('/').pop()?.split('-').pop()?.split('.').shift();
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}`);
@@ -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 in the current branch")
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