@airscript/ghitgud 1.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 (47) hide show
  1. package/.env.base +2 -0
  2. package/.github/CODEOWNERS +1 -0
  3. package/.github/FUNDING.yml +2 -0
  4. package/.github/ISSUE_TEMPLATE/build.md +9 -0
  5. package/.github/ISSUE_TEMPLATE/chore.md +9 -0
  6. package/.github/ISSUE_TEMPLATE/ci.md +9 -0
  7. package/.github/ISSUE_TEMPLATE/documentation.md +9 -0
  8. package/.github/ISSUE_TEMPLATE/feature.md +9 -0
  9. package/.github/ISSUE_TEMPLATE/fix.md +9 -0
  10. package/.github/ISSUE_TEMPLATE/performance.md +9 -0
  11. package/.github/ISSUE_TEMPLATE/refactor.md +9 -0
  12. package/.github/ISSUE_TEMPLATE/style.md +9 -0
  13. package/.github/ISSUE_TEMPLATE/test.md +9 -0
  14. package/.github/PULL_REQUEST_TEMPLATE.md +28 -0
  15. package/.github/workflows/tests.yml +36 -0
  16. package/CHANGELOG.md +4 -0
  17. package/CITATION.cff +13 -0
  18. package/CODE_OF_CONDUCT.md +121 -0
  19. package/CONTRIBUTING.md +2 -0
  20. package/LICENSE +674 -0
  21. package/README.md +54 -0
  22. package/SECURITY.md +9 -0
  23. package/VERSION +1 -0
  24. package/app/api.ts +136 -0
  25. package/app/ascii.ts +18 -0
  26. package/app/commands.ts +117 -0
  27. package/app/config.ts +9 -0
  28. package/app/functions.ts +43 -0
  29. package/app/ghitgud.ts +18 -0
  30. package/app/library.ts +158 -0
  31. package/app/types.ts +8 -0
  32. package/dist/app/api.js +127 -0
  33. package/dist/app/ascii.js +20 -0
  34. package/dist/app/commands.js +89 -0
  35. package/dist/app/config.js +12 -0
  36. package/dist/app/functions.js +37 -0
  37. package/dist/app/ghitgud.js +19 -0
  38. package/dist/app/library.js +123 -0
  39. package/dist/app/types.js +2 -0
  40. package/dist/tests/library.test.js +84 -0
  41. package/package.json +38 -0
  42. package/scripts/clean.sh +2 -0
  43. package/templates/base.json +12 -0
  44. package/templates/conventional.json +53 -0
  45. package/templates/github.json +47 -0
  46. package/tests/library.test.ts +78 -0
  47. package/tsconfig.json +113 -0
package/.env.base ADDED
@@ -0,0 +1,2 @@
1
+ GHITGUD_GITHUB_REPO=
2
+ GHITGUD_GITHUB_TOKEN=
@@ -0,0 +1 @@
1
+ * @airscripts
@@ -0,0 +1,2 @@
1
+ github: [airscripts]
2
+ ko_fi: airscript
@@ -0,0 +1,9 @@
1
+ ---
2
+ name: Build
3
+ about: Got a build system problem? Let’s fix it!
4
+ title: ''
5
+ labels: build
6
+ ---
7
+
8
+ **What’s wrong with the build?**
9
+ Describe the issue in the build process.
@@ -0,0 +1,9 @@
1
+ ---
2
+ name: Chore
3
+ about: General upkeep time!
4
+ title: ''
5
+ labels: chore
6
+ ---
7
+
8
+ **What needs maintenance or updates?**
9
+ Let us know what tasks should be done.
@@ -0,0 +1,9 @@
1
+ ---
2
+ name: CI
3
+ about: Continuous Integration to the rescue!
4
+ title: ''
5
+ labels: ci
6
+ ---
7
+
8
+ **What needs fixing in the CI pipeline?**
9
+ Describe what went wrong or needs improvement in CI.
@@ -0,0 +1,9 @@
1
+ ---
2
+ name: Documentation
3
+ about: Help us improve our docs!
4
+ title: ''
5
+ labels: documentation
6
+ ---
7
+
8
+ **What’s missing from the docs?**
9
+ Point out what needs better explanation or an update.
@@ -0,0 +1,9 @@
1
+ ---
2
+ name: Feature
3
+ about: Suggest something awesome for this project!
4
+ title: ''
5
+ labels: feature
6
+ ---
7
+
8
+ **What amazing feature do you want to see?**
9
+ Tell us your brilliant idea!
@@ -0,0 +1,9 @@
1
+ ---
2
+ name: Fix
3
+ about: Found something broken? Let's fix it!
4
+ title: ''
5
+ labels: fix
6
+ ---
7
+
8
+ **What’s not working?**
9
+ Describe the bug and how we can fix it.
@@ -0,0 +1,9 @@
1
+ ---
2
+ name: Performance
3
+ about: Speed it up!
4
+ title: ''
5
+ labels: performance
6
+ ---
7
+
8
+ **How can we make it faster?**
9
+ Share ideas on improving the performance.
@@ -0,0 +1,9 @@
1
+ ---
2
+ name: Refactor
3
+ about: Time to clean up the code!
4
+ title: ''
5
+ labels: refactor
6
+ ---
7
+
8
+ **What needs to be improved?**
9
+ Let us know what part of the code can be cleaner or more efficient.
@@ -0,0 +1,9 @@
1
+ ---
2
+ name: Style
3
+ about: Let's make it look prettier!
4
+ title: ''
5
+ labels: style
6
+ ---
7
+
8
+ **What needs a style touch-up?**
9
+ Tell us how we can make it look awesome.
@@ -0,0 +1,9 @@
1
+ ---
2
+ name: Tests
3
+ about: Let’s add or fix some tests!
4
+ title: ''
5
+ labels: tests
6
+ ---
7
+
8
+ **What needs testing?**
9
+ Tell us what should be covered with tests.
@@ -0,0 +1,28 @@
1
+ # Pull Request
2
+
3
+ Please fill out the details below to submit your pull request.
4
+
5
+ ## Label:
6
+
7
+ - **Choose one label for your PR:**
8
+ - [ ] **Feature**
9
+ - [ ] **Bug**
10
+ - [ ] **Documentation**
11
+ - [ ] **Styling**
12
+ - [ ] **Refactor**
13
+ - [ ] **Performance**
14
+ - [ ] **Tests**
15
+ - [ ] **Chore**
16
+ - [ ] **Build**
17
+ - [ ] **CI**
18
+
19
+ ## Linked Issues:
20
+
21
+ - **This PR closes the following issue(s):**
22
+ - Closes #<issue-number>
23
+ - (Add any other related issues here)
24
+
25
+ ## Solution:
26
+
27
+ - **Describe the solution:**
28
+ - Briefly explain what you've done and how it addresses the issue.
@@ -0,0 +1,36 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ pull_request:
9
+ branches:
10
+ - main
11
+
12
+ jobs:
13
+ test:
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Setup Node.js
21
+ uses: actions/setup-node@v4
22
+
23
+ with:
24
+ node-version: 22
25
+
26
+ - name: Install pnpm
27
+ uses: pnpm/action-setup@v4
28
+
29
+ with:
30
+ version: 10
31
+
32
+ - name: Install dependencies
33
+ run: pnpm install
34
+
35
+ - name: Run tests
36
+ run: pnpm run test
package/CHANGELOG.md ADDED
@@ -0,0 +1,4 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) with some edits,
4
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
package/CITATION.cff ADDED
@@ -0,0 +1,13 @@
1
+ cff-version: 1.2.0
2
+ message: If you use this software in your work, please cite it using the following metadata
3
+ title: Ghitgud
4
+ authors:
5
+ - family-names: Sardone
6
+ given-names: Francesco
7
+ keywords:
8
+ - credit
9
+ - citation
10
+ version: 1.0.0
11
+ date-released: 2025-06-10
12
+ license: GPL-3.0
13
+ repository-code: https://github.com/airscripts/ghitgud
@@ -0,0 +1,121 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+ We as members, contributors, and leaders pledge to make participation in our
5
+ community a harassment-free experience for everyone, regardless of age, body
6
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
7
+ identity and expression, level of experience, education, socio-economic status,
8
+ nationality, personal appearance, race, caste, color, religion, or sexual identity
9
+ and orientation.
10
+
11
+ We pledge to act and interact in ways that contribute to an open, welcoming,
12
+ diverse, inclusive, and healthy community.
13
+
14
+ ## Our Standards
15
+ Examples of behavior that contributes to a positive environment for our
16
+ community include:
17
+
18
+ * Demonstrating empathy and kindness toward other people
19
+ * Being respectful of differing opinions, viewpoints, and experiences
20
+ * Giving and gracefully accepting constructive feedback
21
+ * Accepting responsibility and apologizing to those affected by our mistakes,
22
+ and learning from the experience
23
+ * Focusing on what is best not just for us as individuals, but for the
24
+ overall community
25
+
26
+ Examples of unacceptable behavior include:
27
+
28
+ * The use of sexualized language or imagery, and sexual attention or
29
+ advances of any kind
30
+ * Trolling, insulting or derogatory comments, and personal or political attacks
31
+ * Public or private harassment
32
+ * Publishing others' private information, such as a physical or email
33
+ address, without their explicit permission
34
+ * Other conduct which could reasonably be considered inappropriate in a
35
+ professional setting
36
+
37
+ ## Enforcement Responsibilities
38
+ Community leaders are responsible for clarifying and enforcing our standards of
39
+ acceptable behavior and will take appropriate and fair corrective action in
40
+ response to any behavior that they deem inappropriate, threatening, offensive,
41
+ or harmful.
42
+
43
+ Community leaders have the right and responsibility to remove, edit, or reject
44
+ comments, commits, code, wiki edits, issues, and other contributions that are
45
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
46
+ decisions when appropriate.
47
+
48
+ ## Scope
49
+ This Code of Conduct applies within all community spaces, and also applies when
50
+ an individual is officially representing the community in public spaces.
51
+ Examples of representing our community include using an official e-mail address,
52
+ posting via an official social media account, or acting as an appointed
53
+ representative at an online or offline event.
54
+
55
+ ## Enforcement
56
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
57
+ reported to the community leaders responsible for enforcement at
58
+ <francesco@airscript.it>.
59
+ All complaints will be reviewed and investigated promptly and fairly.
60
+
61
+ All community leaders are obligated to respect the privacy and security of the
62
+ reporter of any incident.
63
+
64
+ ## Enforcement Guidelines
65
+ Community leaders will follow these Community Impact Guidelines in determining
66
+ the consequences for any action they deem in violation of this Code of Conduct:
67
+
68
+ ### 1. Correction
69
+ **Community Impact**: Use of inappropriate language or other behavior deemed
70
+ unprofessional or unwelcome in the community.
71
+
72
+ **Consequence**: A private, written warning from community leaders, providing
73
+ clarity around the nature of the violation and an explanation of why the
74
+ behavior was inappropriate. A public apology may be requested.
75
+
76
+ ### 2. Warning
77
+ **Community Impact**: A violation through a single incident or series
78
+ of actions.
79
+
80
+ **Consequence**: A warning with consequences for continued behavior. No
81
+ interaction with the people involved, including unsolicited interaction with
82
+ those enforcing the Code of Conduct, for a specified period of time. This
83
+ includes avoiding interactions in community spaces as well as external channels
84
+ like social media. Violating these terms may lead to a temporary or
85
+ permanent ban.
86
+
87
+ ### 3. Temporary Ban
88
+ **Community Impact**: A serious violation of community standards, including
89
+ sustained inappropriate behavior.
90
+
91
+ **Consequence**: A temporary ban from any sort of interaction or public
92
+ communication with the community for a specified period of time. No public or
93
+ private interaction with the people involved, including unsolicited interaction
94
+ with those enforcing the Code of Conduct, is allowed during this period.
95
+ Violating these terms may lead to a permanent ban.
96
+
97
+ ### 4. Permanent Ban
98
+ **Community Impact**: Demonstrating a pattern of violation of community
99
+ standards, including sustained inappropriate behavior, harassment of an
100
+ individual, or aggression toward or disparagement of classes of individuals.
101
+
102
+ **Consequence**: A permanent ban from any sort of public interaction within
103
+ the community.
104
+
105
+ ## Attribution
106
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
107
+ version 2.0, available at
108
+ [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
109
+
110
+ Community Impact Guidelines were inspired by
111
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
112
+
113
+ For answers to common questions about this code of conduct, see the FAQ at
114
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available
115
+ at [https://www.contributor-covenant.org/translations][translations].
116
+
117
+ [homepage]: https://www.contributor-covenant.org
118
+ [v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
119
+ [Mozilla CoC]: https://github.com/mozilla/diversity
120
+ [FAQ]: https://www.contributor-covenant.org/faq
121
+ [translations]: https://www.contributor-covenant.org/translations
@@ -0,0 +1,2 @@
1
+ # Contributing
2
+ When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository, ensuring you follow the [Code of Conduct](https://github.com/airscripts/ghitgud/blob/main/CODE_OF_CONDUCT.md).