@mbe24/99problems 0.2.0 → 0.3.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 (72) hide show
  1. package/.github/ISSUE_TEMPLATE/01-feature.yml +65 -0
  2. package/.github/ISSUE_TEMPLATE/02-bug.yml +122 -0
  3. package/.github/ISSUE_TEMPLATE/99-custom.yml +33 -0
  4. package/.github/ISSUE_TEMPLATE/config.yml +1 -0
  5. package/.github/dependabot.yml +20 -0
  6. package/.github/scripts/publish.js +1 -1
  7. package/.github/workflows/ci.yml +32 -6
  8. package/.github/workflows/man-drift.yml +26 -0
  9. package/.github/workflows/release.yml +7 -7
  10. package/CONTRIBUTING.md +38 -50
  11. package/Cargo.lock +150 -107
  12. package/Cargo.toml +7 -2
  13. package/README.md +107 -85
  14. package/artifacts/binary-aarch64-apple-darwin/99problems +0 -0
  15. package/artifacts/binary-aarch64-unknown-linux-gnu/99problems +0 -0
  16. package/artifacts/binary-x86_64-apple-darwin/99problems +0 -0
  17. package/artifacts/binary-x86_64-pc-windows-msvc/99problems.exe +0 -0
  18. package/artifacts/binary-x86_64-unknown-linux-gnu/99problems +0 -0
  19. package/docs/man/99problems-completions.1 +31 -0
  20. package/docs/man/99problems-config.1 +50 -0
  21. package/docs/man/99problems-get.1 +114 -0
  22. package/docs/man/99problems-help.1 +25 -0
  23. package/docs/man/99problems-man.1 +32 -0
  24. package/docs/man/99problems.1 +52 -0
  25. package/npm/install.js +90 -3
  26. package/package.json +7 -7
  27. package/rust-toolchain.toml +4 -0
  28. package/src/cmd/config/key.rs +126 -0
  29. package/src/cmd/config/mod.rs +218 -0
  30. package/src/cmd/config/render.rs +33 -0
  31. package/src/cmd/config/store.rs +318 -0
  32. package/src/cmd/config/write.rs +173 -0
  33. package/src/cmd/get.rs +658 -0
  34. package/src/cmd/man.rs +117 -0
  35. package/src/cmd/mod.rs +3 -0
  36. package/src/config.rs +618 -118
  37. package/src/error.rs +254 -0
  38. package/src/format/json.rs +59 -18
  39. package/src/format/jsonl.rs +52 -0
  40. package/src/format/mod.rs +25 -3
  41. package/src/format/text.rs +73 -0
  42. package/src/format/yaml.rs +64 -15
  43. package/src/lib.rs +1 -0
  44. package/src/logging.rs +54 -0
  45. package/src/main.rs +225 -138
  46. package/src/model.rs +9 -1
  47. package/src/source/bitbucket/cloud/api.rs +67 -0
  48. package/src/source/bitbucket/cloud/mod.rs +178 -0
  49. package/src/source/bitbucket/cloud/model.rs +211 -0
  50. package/src/source/bitbucket/datacenter/api.rs +74 -0
  51. package/src/source/bitbucket/datacenter/mod.rs +181 -0
  52. package/src/source/bitbucket/datacenter/model.rs +327 -0
  53. package/src/source/bitbucket/mod.rs +90 -0
  54. package/src/source/bitbucket/query.rs +169 -0
  55. package/src/source/bitbucket/shared/auth.rs +54 -0
  56. package/src/source/bitbucket/shared/http.rs +59 -0
  57. package/src/source/bitbucket/shared/mod.rs +5 -0
  58. package/src/source/github/api.rs +128 -0
  59. package/src/source/github/mod.rs +191 -0
  60. package/src/source/github/model.rs +84 -0
  61. package/src/source/github/query.rs +50 -0
  62. package/src/source/gitlab/api.rs +282 -0
  63. package/src/source/gitlab/mod.rs +225 -0
  64. package/src/source/gitlab/model.rs +102 -0
  65. package/src/source/gitlab/query.rs +177 -0
  66. package/src/source/jira/api.rs +222 -0
  67. package/src/source/jira/mod.rs +161 -0
  68. package/src/source/jira/model.rs +99 -0
  69. package/src/source/jira/query.rs +153 -0
  70. package/src/source/mod.rs +65 -7
  71. package/tests/integration.rs +404 -33
  72. package/src/source/github_issues.rs +0 -227
@@ -0,0 +1,65 @@
1
+ name: Feature request
2
+ description: Propose a new feature or enhancement.
3
+ title: "[Feature] "
4
+ labels: ["enhancement"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thanks for proposing a feature. Please describe the problem and the intended design clearly.
10
+
11
+ - type: textarea
12
+ id: problem
13
+ attributes:
14
+ label: Problem
15
+ description: What problem are we solving? Why now?
16
+ placeholder: Describe the user pain or gap this feature addresses.
17
+ validations:
18
+ required: true
19
+
20
+ - type: textarea
21
+ id: design
22
+ attributes:
23
+ label: Design
24
+ description: High-level design and key decisions.
25
+ placeholder: Describe the architecture, interfaces, or behavior changes.
26
+
27
+ - type: textarea
28
+ id: scope
29
+ attributes:
30
+ label: Scope
31
+ description: In-scope implementation items.
32
+ placeholder: |
33
+ - Item 1
34
+ - Item 2
35
+ - Item 3
36
+
37
+ - type: textarea
38
+ id: boundary
39
+ attributes:
40
+ label: Boundary
41
+ description: Explicitly out-of-scope items.
42
+ placeholder: |
43
+ - Not included in this task
44
+ - Deferred to follow-up work
45
+
46
+ - type: textarea
47
+ id: acceptance_criteria
48
+ attributes:
49
+ label: Acceptance Criteria
50
+ description: Measurable conditions that define done.
51
+ placeholder: |
52
+ - Condition 1
53
+ - Condition 2
54
+ - Condition 3
55
+ validations:
56
+ required: true
57
+
58
+ - type: textarea
59
+ id: context
60
+ attributes:
61
+ label: Context
62
+ description: Relevant standards, docs, external constraints, or background.
63
+ placeholder: Provide context in prose and include useful links.
64
+ validations:
65
+ required: true
@@ -0,0 +1,122 @@
1
+ name: Bug report
2
+ description: Report a bug and provide enough detail to reproduce it.
3
+ title: "[Bug] "
4
+ labels: ["bug"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Please provide a clear reproduction and exact command output to speed up triage.
10
+
11
+ - type: textarea
12
+ id: describe_bug
13
+ attributes:
14
+ label: Describe the bug
15
+ description: A clear and concise description of what the bug is.
16
+ placeholder: Explain what is broken.
17
+ validations:
18
+ required: true
19
+
20
+ - type: textarea
21
+ id: reproduce
22
+ attributes:
23
+ label: To Reproduce
24
+ description: Steps to reproduce the behavior.
25
+ placeholder: |
26
+ 1. Run `...`
27
+ 2. Use flags `...`
28
+ 3. Observe error `...`
29
+ validations:
30
+ required: true
31
+
32
+ - type: textarea
33
+ id: expected_behavior
34
+ attributes:
35
+ label: Expected behavior
36
+ description: A clear and concise description of what you expected to happen.
37
+ placeholder: Describe the expected result.
38
+ validations:
39
+ required: true
40
+
41
+ - type: textarea
42
+ id: command_output
43
+ attributes:
44
+ label: Command + output
45
+ description: Include the exact command, flags, and relevant stdout/stderr.
46
+ render: shell
47
+ placeholder: |
48
+ 99problems ...
49
+ Error: ...
50
+ validations:
51
+ required: true
52
+
53
+ - type: textarea
54
+ id: screenshots
55
+ attributes:
56
+ label: Screenshots
57
+ description: If applicable, add terminal screenshots to help explain the problem.
58
+ placeholder: Paste images or links.
59
+
60
+ - type: dropdown
61
+ id: os
62
+ attributes:
63
+ label: OS
64
+ description: Which operating system are you using?
65
+ options:
66
+ - Windows
67
+ - macOS
68
+ - Linux
69
+ - Other
70
+ validations:
71
+ required: true
72
+
73
+ - type: dropdown
74
+ id: shell
75
+ attributes:
76
+ label: Shell
77
+ description: Which shell are you using?
78
+ options:
79
+ - PowerShell
80
+ - Git Bash
81
+ - WSL
82
+ - Bash
83
+ - Zsh
84
+ - Other
85
+ validations:
86
+ required: true
87
+
88
+ - type: dropdown
89
+ id: install_method
90
+ attributes:
91
+ label: Install method
92
+ description: How was the CLI installed?
93
+ options:
94
+ - npm
95
+ - cargo
96
+ - built from source
97
+ - Other
98
+ validations:
99
+ required: true
100
+
101
+ - type: input
102
+ id: tool_version
103
+ attributes:
104
+ label: Tool version
105
+ description: Output of `99problems --version`.
106
+ placeholder: 99problems x.y.z
107
+ validations:
108
+ required: true
109
+
110
+ - type: textarea
111
+ id: configuration_context
112
+ attributes:
113
+ label: Configuration context
114
+ description: Share relevant `.99problems` instance/platform setup (remove secrets).
115
+ placeholder: Instance alias, platform, URL/repo/project settings, etc.
116
+
117
+ - type: textarea
118
+ id: additional_context
119
+ attributes:
120
+ label: Additional context
121
+ description: Add any other context about the problem here.
122
+ placeholder: Related links, logs, constraints, or history.
@@ -0,0 +1,33 @@
1
+ name: Custom issue
2
+ description: Open a custom issue when feature/bug templates do not fit.
3
+ title: "[Custom] "
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ Use this template for requests that do not fit feature or bug reporting.
9
+
10
+ - type: textarea
11
+ id: problem
12
+ attributes:
13
+ label: Problem
14
+ description: What is the issue or request?
15
+ placeholder: Describe the problem clearly.
16
+ validations:
17
+ required: true
18
+
19
+ - type: textarea
20
+ id: details
21
+ attributes:
22
+ label: Details
23
+ description: Additional technical details, proposals, or notes.
24
+ placeholder: Add any implementation or background details.
25
+
26
+ - type: textarea
27
+ id: context
28
+ attributes:
29
+ label: Context
30
+ description: Relevant context, links, standards, or constraints.
31
+ placeholder: Explain context and include supporting links.
32
+ validations:
33
+ required: true
@@ -0,0 +1 @@
1
+ blank_issues_enabled: false
@@ -0,0 +1,20 @@
1
+ # Please see the documentation for all configuration options:
2
+ # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
3
+
4
+ version: 2
5
+ updates:
6
+ - package-ecosystem: "cargo"
7
+ directory: "/"
8
+ schedule:
9
+ interval: "weekly"
10
+ ignore:
11
+ # These are peer deps of Cargo and should not be automatically bumped
12
+ - dependency-name: "semver"
13
+ - dependency-name: "crates-io"
14
+ rebase-strategy: "disabled"
15
+
16
+ - package-ecosystem: "github-actions"
17
+ directory: "/"
18
+ schedule:
19
+ interval: "weekly"
20
+ rebase-strategy: "disabled"
@@ -69,7 +69,7 @@ for (const p of platforms) {
69
69
  os: [p.os],
70
70
  cpu: [p.cpu],
71
71
  main: `bin/${p.binary}`,
72
- license: "MIT",
72
+ license: "Apache-2.0",
73
73
  repository: { type: "git", url: "https://github.com/mbe24/99problems" },
74
74
  };
75
75
  fs.writeFileSync(
@@ -1,10 +1,11 @@
1
1
  name: CI
2
2
 
3
3
  on:
4
- push:
5
- branches: ["**"]
6
4
  pull_request:
7
- branches: ["**"]
5
+ branches: ["main"]
6
+ push:
7
+ branches: ["main"]
8
+ tags: ["v*"]
8
9
 
9
10
  env:
10
11
  CARGO_TERM_COLOR: always
@@ -14,7 +15,7 @@ jobs:
14
15
  name: Test
15
16
  runs-on: ubuntu-latest
16
17
  steps:
17
- - uses: actions/checkout@v4
18
+ - uses: actions/checkout@v6
18
19
 
19
20
  - name: Install Rust toolchain
20
21
  uses: dtolnay/rust-toolchain@stable
@@ -22,7 +23,7 @@ jobs:
22
23
  components: clippy, rustfmt
23
24
 
24
25
  - name: Cache cargo registry
25
- uses: actions/cache@v4
26
+ uses: actions/cache@v5
26
27
  with:
27
28
  path: |
28
29
  ~/.cargo/registry
@@ -44,4 +45,29 @@ jobs:
44
45
  if: env.GITHUB_TOKEN != ''
45
46
  env:
46
47
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47
- run: cargo test -- --include-ignored
48
+ run: cargo test -- --include-ignored --skip jira_ --skip bitbucket_
49
+
50
+ clippy_pedantic:
51
+ name: Clippy (pedantic, advisory)
52
+ runs-on: ubuntu-latest
53
+ continue-on-error: true
54
+ steps:
55
+ - uses: actions/checkout@v6
56
+
57
+ - name: Install Rust toolchain
58
+ uses: dtolnay/rust-toolchain@stable
59
+ with:
60
+ components: clippy
61
+
62
+ - name: Cache cargo registry
63
+ uses: actions/cache@v5
64
+ with:
65
+ path: |
66
+ ~/.cargo/registry
67
+ ~/.cargo/git
68
+ target
69
+ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
70
+ restore-keys: ${{ runner.os }}-cargo-
71
+
72
+ - name: Clippy pedantic
73
+ run: cargo clippy --all-targets --no-deps -- -W clippy::pedantic
@@ -0,0 +1,26 @@
1
+ name: Man Drift
2
+
3
+ on:
4
+ pull_request:
5
+ branches: ["main"]
6
+ push:
7
+ branches: ["main"]
8
+
9
+ env:
10
+ CARGO_TERM_COLOR: always
11
+
12
+ jobs:
13
+ drift:
14
+ name: Man page drift check
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v6
18
+
19
+ - name: Install Rust toolchain
20
+ uses: dtolnay/rust-toolchain@stable
21
+
22
+ - name: Generate man pages
23
+ run: cargo run -- man --output docs/man --section 1
24
+
25
+ - name: Check for drift
26
+ run: git diff --exit-code -- docs/man
@@ -46,7 +46,7 @@ jobs:
46
46
  use_cross: true
47
47
 
48
48
  steps:
49
- - uses: actions/checkout@v4
49
+ - uses: actions/checkout@v6
50
50
 
51
51
  - name: Install Rust toolchain
52
52
  uses: dtolnay/rust-toolchain@stable
@@ -54,7 +54,7 @@ jobs:
54
54
  targets: ${{ matrix.target }}
55
55
 
56
56
  - name: Cache cargo registry
57
- uses: actions/cache@v4
57
+ uses: actions/cache@v5
58
58
  with:
59
59
  path: |
60
60
  ~/.cargo/registry
@@ -71,7 +71,7 @@ jobs:
71
71
  run: ${{ matrix.use_cross && 'cross' || 'cargo' }} build --release --target ${{ matrix.target }}
72
72
 
73
73
  - name: Upload binary artifact
74
- uses: actions/upload-artifact@v4
74
+ uses: actions/upload-artifact@v7
75
75
  with:
76
76
  name: binary-${{ matrix.target }}
77
77
  path: target/${{ matrix.target }}/release/${{ matrix.binary }}
@@ -81,7 +81,7 @@ jobs:
81
81
  needs: build
82
82
  runs-on: ubuntu-latest
83
83
  steps:
84
- - uses: actions/checkout@v4
84
+ - uses: actions/checkout@v6
85
85
 
86
86
  - name: Install Rust toolchain
87
87
  uses: dtolnay/rust-toolchain@stable
@@ -96,15 +96,15 @@ jobs:
96
96
  needs: build
97
97
  runs-on: ubuntu-latest
98
98
  steps:
99
- - uses: actions/checkout@v4
99
+ - uses: actions/checkout@v6
100
100
 
101
- - uses: actions/setup-node@v4
101
+ - uses: actions/setup-node@v6
102
102
  with:
103
103
  node-version: "20"
104
104
  registry-url: "https://registry.npmjs.org"
105
105
 
106
106
  - name: Download all binaries
107
- uses: actions/download-artifact@v4
107
+ uses: actions/download-artifact@v8
108
108
  with:
109
109
  path: artifacts/
110
110
 
package/CONTRIBUTING.md CHANGED
@@ -1,74 +1,62 @@
1
1
  # Contributing to 99problems
2
2
 
3
- Thank you for taking the time to contribute! 🎉
4
-
5
- ## Ways to contribute
6
-
7
- - **Bug reports** — open an issue describing what happened and what you expected
8
- - **Feature requests** — open an issue with the `enhancement` label
9
- - **Pull requests** — see the workflow below
10
-
11
- ## Development setup
3
+ ## Development Setup
12
4
 
13
5
  ```bash
14
- # Prerequisites: Rust stable (1.85+), cargo
15
6
  git clone https://github.com/mbe24/99problems
16
7
  cd 99problems
17
8
 
18
- # Install the pre-commit hook (runs cargo fmt + clippy before each commit)
9
+ # Optional: install local pre-commit hook (fmt + clippy)
19
10
  cp .githooks/pre-commit .git/hooks/pre-commit
20
- chmod +x .git/hooks/pre-commit # not needed on Windows
11
+ chmod +x .git/hooks/pre-commit
21
12
 
22
- # Build
23
13
  cargo build
24
-
25
- # Run unit tests
26
14
  cargo test
27
-
28
- # Run integration tests (requires a GitHub token)
29
- export GITHUB_TOKEN=ghp_your_token
30
- cargo test -- --include-ignored
31
15
  ```
32
16
 
33
- ## Pull request workflow
17
+ Ignored integration tests (live APIs):
34
18
 
35
- 1. Fork the repo and create a branch: `git checkout -b my-feature`
36
- 2. Make your changes and add tests where appropriate
37
- 3. Run `cargo test` — all tests must pass
38
- 4. Run `cargo clippy` and `cargo fmt --check` — no new warnings
39
- 5. Open a pull request with a clear description of what and why
19
+ ```bash
20
+ cargo test -- --include-ignored --skip jira_
21
+ ```
40
22
 
41
- ## Project structure
23
+ ## Local Quality Gates
42
24
 
25
+ Run these before committing:
26
+
27
+ ```bash
28
+ cargo fmt
29
+ cargo clippy --all-targets --no-deps -- -D warnings
30
+ cargo clippy --all-targets --no-deps -- -W clippy::pedantic
31
+ cargo test
43
32
  ```
44
- src/
45
- main.rs # CLI entry point (clap)
46
- config.rs # Dotfile config loading
47
- model.rs # Shared data types (Conversation, Comment)
48
- source/
49
- mod.rs # Source trait + Query builder
50
- github_issues.rs # GitHub Issues API client
51
- format/
52
- mod.rs # Formatter trait
53
- json.rs # JSON output
54
- yaml.rs # YAML output
55
- tests/
56
- integration.rs # Live API tests (#[ignore] by default)
33
+
34
+ ## Help and Man Pages
35
+
36
+ The CLI help and man pages are generated from the clap command model.
37
+
38
+ Regenerate man pages after CLI/help changes:
39
+
40
+ ```bash
41
+ cargo run -- man --output docs/man --section 1
57
42
  ```
58
43
 
59
- ## Adding a new source
44
+ Verify no drift:
45
+
46
+ ```bash
47
+ git diff -- docs/man
48
+ ```
60
49
 
61
- 1. Create `src/source/my_source.rs` implementing the `Source` trait
62
- 2. Register it in `src/source/mod.rs`
63
- 3. Add a variant to `SourceKind` in `src/main.rs`
50
+ ## Command Module Layout
64
51
 
65
- ## Adding a new output format
52
+ Hybrid command-module convention:
66
53
 
67
- 1. Create `src/format/my_format.rs` implementing the `Formatter` trait
68
- 2. Register it in `src/format/mod.rs`
69
- 3. Add a variant to `OutputFormat` in `src/main.rs`
54
+ - simple commands: `src/cmd/<name>.rs`
55
+ - complex commands: `src/cmd/<name>/mod.rs` with submodules
70
56
 
71
- ## Code of conduct
57
+ ## Pull Requests
72
58
 
73
- Be respectful and constructive. We follow the
74
- [Contributor Covenant](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).
59
+ 1. Create a feature branch.
60
+ 2. Keep commits focused and compile-safe.
61
+ 3. Run local quality gates.
62
+ 4. Open a PR with problem statement + design summary.