@airscript/ghitgud 1.0.3 → 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 (50) hide show
  1. package/README.md +104 -18
  2. package/VERSION +1 -1
  3. package/dist/index.js +793 -0
  4. package/dist/templates/base.json +12 -0
  5. package/dist/templates/conventional.json +52 -0
  6. package/dist/templates/github.json +47 -0
  7. package/package.json +59 -36
  8. package/templates/base.json +1 -1
  9. package/templates/conventional.json +51 -52
  10. package/templates/github.json +1 -1
  11. package/.env.base +0 -2
  12. package/.github/CODEOWNERS +0 -1
  13. package/.github/FUNDING.yml +0 -2
  14. package/.github/ISSUE_TEMPLATE/build.md +0 -9
  15. package/.github/ISSUE_TEMPLATE/chore.md +0 -9
  16. package/.github/ISSUE_TEMPLATE/ci.md +0 -9
  17. package/.github/ISSUE_TEMPLATE/documentation.md +0 -9
  18. package/.github/ISSUE_TEMPLATE/feature.md +0 -9
  19. package/.github/ISSUE_TEMPLATE/fix.md +0 -9
  20. package/.github/ISSUE_TEMPLATE/performance.md +0 -9
  21. package/.github/ISSUE_TEMPLATE/refactor.md +0 -9
  22. package/.github/ISSUE_TEMPLATE/style.md +0 -9
  23. package/.github/ISSUE_TEMPLATE/test.md +0 -9
  24. package/.github/PULL_REQUEST_TEMPLATE.md +0 -28
  25. package/.github/workflows/tests.yml +0 -36
  26. package/CHANGELOG.md +0 -29
  27. package/CITATION.cff +0 -13
  28. package/CODE_OF_CONDUCT.md +0 -121
  29. package/CONTRIBUTING.md +0 -2
  30. package/SECURITY.md +0 -9
  31. package/app/api.ts +0 -136
  32. package/app/ascii.ts +0 -18
  33. package/app/commands.ts +0 -117
  34. package/app/config.ts +0 -9
  35. package/app/functions.ts +0 -43
  36. package/app/ghitgud.ts +0 -19
  37. package/app/library.ts +0 -157
  38. package/app/types.ts +0 -8
  39. package/dist/app/api.js +0 -127
  40. package/dist/app/ascii.js +0 -20
  41. package/dist/app/commands.js +0 -89
  42. package/dist/app/config.js +0 -12
  43. package/dist/app/functions.js +0 -37
  44. package/dist/app/ghitgud.js +0 -20
  45. package/dist/app/library.js +0 -122
  46. package/dist/app/types.js +0 -2
  47. package/dist/tests/library.test.js +0 -81
  48. package/scripts/clean.sh +0 -2
  49. package/tests/library.test.ts +0 -77
  50. package/tsconfig.json +0 -113
package/README.md CHANGED
@@ -1,45 +1,130 @@
1
- # Ghitgud
2
- A simple CLI to give superpowers to GitHub.
1
+ <h1 align="center">
2
+ Ghitgud
3
+ </h1>
4
+
5
+ <p align="center">
6
+ A simple CLI to give superpowers to GitHub.
7
+ </p>
8
+
9
+ <p align="center">
10
+ <img src="https://github.com/user-attachments/assets/57aac0c0-1bd2-4cb4-8445-36a161a7e2ee" alt="Usage GIF" />
11
+ </p>
12
+
13
+ <p align="center">
14
+ <a href="https://www.npmjs.com/package/@airscript/ghitgud"><img src="https://img.shields.io/npm/v/@airscript/ghitgud" alt="npm" /></a>
15
+ <a href="https://github.com/airscripts/ghitgud/blob/main/LICENSE"><img src="https://img.shields.io/github/license/airscripts/ghitgud" alt="License" /></a>
16
+ </p>
3
17
 
4
18
  ## Table of Contents
19
+
5
20
  - [Installation](#installation)
6
- - [Usage](#usage)
7
- - [Wiki](#wiki)
21
+ - [Configuration](#configuration)
22
+ - [Commands](#commands)
23
+ - [Templates](#templates)
24
+ - [Output Format](#output-format)
25
+ - [Development](#development)
8
26
  - [Contributing](#contributing)
9
27
  - [Support](#support)
10
28
  - [License](#license)
11
29
 
12
30
  ## Installation
13
- Follow the steps below to make use of Ghitgud.
14
31
 
15
- Clone this repository:
16
32
  ```bash
17
33
  npm install -g @airscript/ghitgud
18
34
  ```
19
35
 
20
- ## Usage
21
- After installing you'll be able to access the CLI and its relative help command:
36
+ ## Configuration
37
+
38
+ Set a GitHub personal access token and repository (in `owner/repo` format):
39
+
40
+ ```bash
41
+ ghitgud config set token <your-token>
42
+ ghitgud config set repo owner/repository
43
+ ```
44
+
45
+ Retrieve a configured value:
46
+
22
47
  ```bash
23
- ghitgud help
48
+ ghitgud config get token
49
+ ghitgud config get repo
50
+ ```
51
+
52
+ > Create a token at: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
53
+
54
+ ## Commands
55
+
24
56
  ```
57
+ ghitgud ping Check if the CLI is working
58
+ ghitgud labels list List all labels for a repository
59
+ ghitgud labels pull Pull labels from a repository to local config
60
+ ghitgud labels pull -t <name> Pull labels from a built-in template
61
+ ghitgud labels push Push local labels to a repository
62
+ ghitgud labels push -t <name> Push a built-in template to a repository
63
+ ghitgud labels prune Delete all local labels from a repository
64
+ ghitgud config set <key> <val> Set a configuration value (token or repo)
65
+ ghitgud config get <key> Get a configuration value
66
+ ```
67
+
68
+ ## Templates
69
+
70
+ Built-in label presets are available with the `--template` / `-t` flag:
71
+
72
+ | Template | Description |
73
+ | -------------- | ---------------------------- |
74
+ | `base` | Minimal set: bug and feature |
75
+ | `conventional` | Conventional Commits labels |
76
+ | `github` | GitHub default labels |
25
77
 
26
- Remember that to use the CLI you have to set a token and a repo with the format `username/repository` (e.g. airscripts/ghitgud):
27
78
  ```bash
28
- ghitgud config set token `your-token-here`
29
- ghitgud config set repo `username/repository`
79
+ ghitgud labels pull -t conventional
80
+ ghitgud labels push -t conventional
81
+ ```
82
+
83
+ ## Output Format
84
+
85
+ All commands output JSON to stdout on success and JSON to stderr on failure.
86
+
87
+ Success:
88
+
89
+ ```json
90
+ {
91
+ "success": true,
92
+ "metadata": [...]
93
+ }
94
+ ```
95
+
96
+ Error:
97
+
98
+ ```json
99
+ {
100
+ "success": false,
101
+ "error": "You must set the GHITGUD_GITHUB_REPO environment variable."
102
+ }
30
103
  ```
31
- > You can create your token with: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
32
104
 
33
- ## Wiki
34
- For more in-depth help with the usage of this CLI, just check the wiki: https://github.com/airscripts/ghitgud/wiki
105
+ ## Development
106
+
107
+ ```bash
108
+ pnpm install # install dependencies
109
+ pnpm build # build with Vite (single CJS bundle)
110
+ pnpm start # run the CLI locally
111
+ pnpm test # run tests (watch mode)
112
+ pnpm test -- --run # single test run (no watch)
113
+ pnpm test:coverage # run tests with coverage
114
+ pnpm typecheck # type check without emitting
115
+ pnpm lint # type check (alias for typecheck)
116
+ pnpm clean # remove build artifacts
117
+ ```
35
118
 
36
119
  ## Contributing
120
+
37
121
  Contributions and suggestions about how to improve this project are welcome!
38
122
  Please follow [our contribution guidelines](https://github.com/airscripts/ghitgud/blob/main/CONTRIBUTING.md).
39
123
 
40
124
  ## Support
41
- If you want to support my work you can do it by following me, leaving a star, sharing my projects or also donating at the links below.
42
- Choose what you find more suitable for you:
125
+
126
+ If you want to support my work you can do it by following me, leaving a star, sharing my projects or also donating at the links below.
127
+ Choose what you find more suitable for you:
43
128
 
44
129
  <a href="https://sponsor.airscript.it" target="blank">
45
130
  <img src="https://raw.githubusercontent.com/airscripts/assets/main/images/github-sponsors.svg" alt="GitHub Sponsors" width="30px" />
@@ -48,5 +133,6 @@ Choose what you find more suitable for you:
48
133
  <img src="https://raw.githubusercontent.com/airscripts/assets/main/images/kofi.svg" alt="Kofi" width="30px" />
49
134
  </a>
50
135
 
51
- ## License
136
+ ## License
137
+
52
138
  This repository is licensed under [GPL-3.0 License](https://github.com/airscripts/ghitgud/blob/main/LICENSE).
package/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.3
1
+ 2.0.0