@nozich/git-mood 0.1.2 → 0.1.3
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/.github/ISSUE_TEMPLATE/bug_report.md +26 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
- package/.github/pull_request_template.md +12 -0
- package/CONTRIBUTING.md +43 -0
- package/Cargo.lock +1 -1
- package/Cargo.toml +4 -1
- package/SECURITY.md +26 -0
- package/bin/cli.js +1 -1
- package/package.json +1 -1
- package/src/main.rs +9 -4
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 🐛 Bug Report
|
|
3
|
+
about: Create a report to help us improve.
|
|
4
|
+
title: 'bug: '
|
|
5
|
+
labels: 'bug'
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Description
|
|
10
|
+
Provide a clear and concise description of the bug.
|
|
11
|
+
|
|
12
|
+
## Steps to Reproduce
|
|
13
|
+
1. Go to '...'
|
|
14
|
+
2. Run command '...'
|
|
15
|
+
3. See error '...'
|
|
16
|
+
|
|
17
|
+
## Expected Behavior
|
|
18
|
+
Provide a clear description of what you expected to happen.
|
|
19
|
+
|
|
20
|
+
## Environment Specs
|
|
21
|
+
- **OS**: [e.g. Windows 11, Ubuntu 24.04, macOS Sonoma]
|
|
22
|
+
- **Tool Version**: [e.g. 0.1.2]
|
|
23
|
+
- **Node / Cargo Version**: [e.g. Node 24, Cargo 1.78]
|
|
24
|
+
|
|
25
|
+
## Additional Context
|
|
26
|
+
Add any other context, logs, or screenshots about the problem here.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 🚀 Feature Request
|
|
3
|
+
about: Suggest an idea or enhancement for this project.
|
|
4
|
+
title: 'feat: '
|
|
5
|
+
labels: 'enhancement'
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Is your feature request related to a problem?
|
|
10
|
+
Provide a clear description of what the problem is (e.g. "I'm always frustrated when...").
|
|
11
|
+
|
|
12
|
+
## Proposed Solution
|
|
13
|
+
Provide a clear description of what you want to happen and the proposed implementation.
|
|
14
|
+
|
|
15
|
+
## Alternative Solutions Considered
|
|
16
|
+
Describe any alternative solutions or features you've considered.
|
|
17
|
+
|
|
18
|
+
## Additional Context
|
|
19
|
+
Add any other context or mockups about the feature request here.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
Provide a clear description of the changes introduced by this Pull Request.
|
|
3
|
+
|
|
4
|
+
## Related Issues
|
|
5
|
+
Fixes # (issue number)
|
|
6
|
+
|
|
7
|
+
## Checklist
|
|
8
|
+
- [ ] My commits are GPG/SSH signed.
|
|
9
|
+
- [ ] My commit messages follow the Conventional Commits specification.
|
|
10
|
+
- [ ] I have added tests to verify my changes.
|
|
11
|
+
- [ ] All new and existing tests passed.
|
|
12
|
+
- [ ] I have updated the documentation accordingly.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Contributing to Nozich Open Source Projects
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing! To maintain enterprise-grade software standards, we follow a structured contribution flow.
|
|
4
|
+
|
|
5
|
+
## 1. Branching Strategy & Development Workflow
|
|
6
|
+
|
|
7
|
+
We follow a strict git branching strategy:
|
|
8
|
+
- **`main` / `master`**: Stable release branch. Direct pushes are disabled/protected.
|
|
9
|
+
- **`feat/*`**: For new features and enhancements.
|
|
10
|
+
- **`fix/*`**: For bug fixes.
|
|
11
|
+
- **`refactor/*`**: For code refactoring or cleaning.
|
|
12
|
+
- **`docs/*`**: For documentation changes.
|
|
13
|
+
|
|
14
|
+
### Workflow:
|
|
15
|
+
1. Fork the repository.
|
|
16
|
+
2. Create a feature branch from `main` (e.g., `feat/add-json-parser`).
|
|
17
|
+
3. Write clean, modular, and documented code.
|
|
18
|
+
4. Add unit and integration tests to verify your changes.
|
|
19
|
+
5. Verify linting and formatting locally.
|
|
20
|
+
6. Commit your changes (must be GPG/SSH signed).
|
|
21
|
+
7. Push to your fork and submit a Pull Request.
|
|
22
|
+
|
|
23
|
+
## 2. Commit Message Guidelines
|
|
24
|
+
|
|
25
|
+
We enforce **Conventional Commits**:
|
|
26
|
+
- Format: `<type>(<scope>): <description>`
|
|
27
|
+
- Examples:
|
|
28
|
+
- `feat(gateway): add multi-tenant routing rule matcher`
|
|
29
|
+
- `fix(cli): resolve command-line parser crash on null value`
|
|
30
|
+
- `docs(readme): update installation binary links`
|
|
31
|
+
|
|
32
|
+
## 3. Commit Verification (GPG/SSH Signing)
|
|
33
|
+
|
|
34
|
+
To verify contributor identity, **all commits must be signed**. Ensure your git client is configured with a valid signing key:
|
|
35
|
+
```bash
|
|
36
|
+
git config --global commit.gpgsign true
|
|
37
|
+
```
|
|
38
|
+
Unsigned pull requests will fail validation checks.
|
|
39
|
+
|
|
40
|
+
## 4. Coding Standards
|
|
41
|
+
|
|
42
|
+
- **Rust**: Format code using `cargo fmt` and ensure no warnings are returned by `cargo clippy`.
|
|
43
|
+
- **TypeScript / Node**: Follow standard ESLint rules and compile with strict type checking.
|
package/Cargo.lock
CHANGED
package/Cargo.toml
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "git-mood"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.3"
|
|
4
4
|
edition = "2021"
|
|
5
|
+
description = "Color your GitHub contribution graph with the mood of your git commits"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
repository = "https://github.com/anilcan-kara/git-mood"
|
|
5
8
|
|
|
6
9
|
[dependencies]
|
|
7
10
|
serde = { version = "1.0", features = ["derive"] }
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
We take security vulnerabilities seriously. Thank you for helping keep our open-source tools secure.
|
|
4
|
+
|
|
5
|
+
## Supported Versions
|
|
6
|
+
|
|
7
|
+
Only the latest released version of this package is actively supported and receiving security updates.
|
|
8
|
+
|
|
9
|
+
| Version | Supported |
|
|
10
|
+
| ------- | --------- |
|
|
11
|
+
| Latest | ✅ Yes |
|
|
12
|
+
| Older | ❌ No |
|
|
13
|
+
|
|
14
|
+
## Reporting a Vulnerability
|
|
15
|
+
|
|
16
|
+
**Please do not report security vulnerabilities via public GitHub issues.**
|
|
17
|
+
|
|
18
|
+
Instead, please send a detailed report to **anilcankara.com@gmail.com**.
|
|
19
|
+
|
|
20
|
+
Include the following information in your report:
|
|
21
|
+
- Package name and version.
|
|
22
|
+
- Vulnerability type (e.g. buffer overflow, remote code execution).
|
|
23
|
+
- Steps to reproduce or a working Proof of Concept (PoC).
|
|
24
|
+
- Potential impact.
|
|
25
|
+
|
|
26
|
+
We will acknowledge receipt of your report within 48 hours and coordinate a fix and advisory release.
|
package/bin/cli.js
CHANGED
package/package.json
CHANGED
package/src/main.rs
CHANGED
|
@@ -65,7 +65,7 @@ fn print_help() {
|
|
|
65
65
|
println!("Usage:");
|
|
66
66
|
println!(" git-mood init Install git hook in the current repository");
|
|
67
67
|
println!(" git-mood status Display terminal dashboard of your moods");
|
|
68
|
-
println!(" git-mood sync
|
|
68
|
+
println!(" git-mood sync [file] Generate SVG (defaults to git-mood.svg) and push it");
|
|
69
69
|
println!();
|
|
70
70
|
println!("Hook Command (Internal):");
|
|
71
71
|
println!(" git-mood commit-hook <file> Analyze commit message file");
|
|
@@ -202,12 +202,17 @@ fn main() {
|
|
|
202
202
|
println!();
|
|
203
203
|
}
|
|
204
204
|
"sync" => {
|
|
205
|
-
|
|
205
|
+
let svg_filename = if args.len() >= 3 {
|
|
206
|
+
&args[2]
|
|
207
|
+
} else {
|
|
208
|
+
"git-mood.svg"
|
|
209
|
+
};
|
|
210
|
+
println!("{} Generating {}...", "[git-mood]".green(), svg_filename);
|
|
206
211
|
let db_path = get_log_path();
|
|
207
212
|
let db = load_db(&db_path);
|
|
208
213
|
|
|
209
214
|
let svg_content = svg::generate_svg(&db);
|
|
210
|
-
let svg_path = Path::new(
|
|
215
|
+
let svg_path = Path::new(svg_filename);
|
|
211
216
|
|
|
212
217
|
if let Err(e) = fs::write(svg_path, svg_content) {
|
|
213
218
|
eprintln!("{}: Failed to write SVG file: {}", "Error".red().bold(), e);
|
|
@@ -221,7 +226,7 @@ fn main() {
|
|
|
221
226
|
|
|
222
227
|
// git add
|
|
223
228
|
let add_status = Command::new("git")
|
|
224
|
-
.args(["add",
|
|
229
|
+
.args(["add", svg_filename])
|
|
225
230
|
.status();
|
|
226
231
|
|
|
227
232
|
if let Ok(status) = add_status {
|