@airscript/ghitgud 1.0.3 → 2.1.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 +113 -18
  2. package/VERSION +1 -1
  3. package/dist/index.js +1010 -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 +61 -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,139 @@
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 gh <args> Pass through to the gh CLI
58
+ ghitgud notifications list List notifications
59
+ ghitgud notifications list -a Include read notifications
60
+ ghitgud notifications list -p Only participating
61
+ ghitgud notifications list -r owner/repo Filter by repository
62
+ ghitgud notifications read <id> Mark a notification as read
63
+ ghitgud notifications done <id> Mark a notification as done
64
+ ghitgud activity Assigned issues, review requests, mentions
65
+ ghitgud mentions Recent @mentions of you
66
+ ghitgud ping Check if the CLI is working
67
+ ghitgud labels list List all labels for a repository
68
+ ghitgud labels pull Pull labels from a repository to local config
69
+ ghitgud labels pull -t <name> Pull labels from a built-in template
70
+ ghitgud labels push Push local labels to a repository
71
+ ghitgud labels push -t <name> Push a built-in template to a repository
72
+ ghitgud labels prune Delete all local labels from a repository
73
+ ghitgud config set <key> <val> Set a configuration value (token or repo)
74
+ ghitgud config get <key> Get a configuration value
75
+ ```
76
+
77
+ ## Templates
78
+
79
+ Built-in label presets are available with the `--template` / `-t` flag:
80
+
81
+ | Template | Description |
82
+ | -------------- | ---------------------------- |
83
+ | `base` | Minimal set: bug and feature |
84
+ | `conventional` | Conventional Commits labels |
85
+ | `github` | GitHub default labels |
25
86
 
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
87
  ```bash
28
- ghitgud config set token `your-token-here`
29
- ghitgud config set repo `username/repository`
88
+ ghitgud labels pull -t conventional
89
+ ghitgud labels push -t conventional
90
+ ```
91
+
92
+ ## Output Format
93
+
94
+ All commands output JSON to stdout on success and JSON to stderr on failure.
95
+
96
+ Success:
97
+
98
+ ```json
99
+ {
100
+ "success": true,
101
+ "metadata": [...]
102
+ }
103
+ ```
104
+
105
+ Error:
106
+
107
+ ```json
108
+ {
109
+ "success": false,
110
+ "error": "You must set the GHITGUD_GITHUB_REPO environment variable."
111
+ }
30
112
  ```
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
113
 
33
- ## Wiki
34
- For more in-depth help with the usage of this CLI, just check the wiki: https://github.com/airscripts/ghitgud/wiki
114
+ ## Development
115
+
116
+ ```bash
117
+ pnpm install # install dependencies
118
+ pnpm build # build with Vite (single CJS bundle)
119
+ pnpm start # run the CLI locally
120
+ pnpm test # run tests (watch mode)
121
+ pnpm test -- --run # single test run (no watch)
122
+ pnpm test:coverage # run tests with coverage
123
+ pnpm typecheck # type check without emitting
124
+ pnpm lint # type check (alias for typecheck)
125
+ pnpm clean # remove build artifacts
126
+ ```
35
127
 
36
128
  ## Contributing
129
+
37
130
  Contributions and suggestions about how to improve this project are welcome!
38
131
  Please follow [our contribution guidelines](https://github.com/airscripts/ghitgud/blob/main/CONTRIBUTING.md).
39
132
 
40
133
  ## 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:
134
+
135
+ 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.
136
+ Choose what you find more suitable for you:
43
137
 
44
138
  <a href="https://sponsor.airscript.it" target="blank">
45
139
  <img src="https://raw.githubusercontent.com/airscripts/assets/main/images/github-sponsors.svg" alt="GitHub Sponsors" width="30px" />
@@ -48,5 +142,6 @@ Choose what you find more suitable for you:
48
142
  <img src="https://raw.githubusercontent.com/airscripts/assets/main/images/kofi.svg" alt="Kofi" width="30px" />
49
143
  </a>
50
144
 
51
- ## License
145
+ ## License
146
+
52
147
  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.1.0