contribute-now 0.8.0 → 0.9.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.
- package/README.md +51 -5
- package/dist/cli.js +1853 -809
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -88,7 +88,8 @@ cn setup # short alias — even shorter than git!
|
|
|
88
88
|
|
|
89
89
|
- **[Git](https://git-scm.com/)** — required
|
|
90
90
|
- **[GitHub CLI](https://cli.github.com)** (`gh`) — recommended; required for PR creation, role detection, and merge status checks
|
|
91
|
-
- **[GitHub Copilot](https://github.com/features/copilot)** — optional;
|
|
91
|
+
- **[GitHub Copilot](https://github.com/features/copilot)** — optional; one of the supported AI providers
|
|
92
|
+
- **[Ollama Cloud](https://ollama.com)** or **[OpenRouter](https://openrouter.ai)** API key — optional; alternative AI providers
|
|
92
93
|
|
|
93
94
|
---
|
|
94
95
|
|
|
@@ -106,7 +107,7 @@ Steps:
|
|
|
106
107
|
1. Choose **workflow mode** — Clean Flow, GitHub Flow, or Git Flow
|
|
107
108
|
2. Choose **commit convention** — Clean Commit, Conventional Commits, or None
|
|
108
109
|
3. Choose whether **AI features** should be enabled for this repo
|
|
109
|
-
4. If using **Ollama Cloud**, pick from the available models returned by your
|
|
110
|
+
4. If using **Ollama Cloud** or **OpenRouter**, enter your API key; pick from the available models returned by your key, or enter one manually
|
|
110
111
|
5. Detect remotes and auto-detect your **role** (maintainer or contributor)
|
|
111
112
|
6. Confirm branch and remote names
|
|
112
113
|
7. Write `.git/contribute-now/config.json` (or update `.contributerc.json` if that legacy file is still the active source)
|
|
@@ -127,7 +128,7 @@ cn config --json
|
|
|
127
128
|
cn config --edit
|
|
128
129
|
```
|
|
129
130
|
|
|
130
|
-
Use `--edit` to update workflow settings, branch names, commit convention, AI provider details,
|
|
131
|
+
Use `--edit` to update workflow settings, branch names, commit convention, AI provider details, stored API keys (Ollama Cloud or OpenRouter), and to choose from the currently available models for the selected provider.
|
|
131
132
|
|
|
132
133
|
---
|
|
133
134
|
|
|
@@ -304,9 +305,44 @@ cn validate "added stuff" # exit 1
|
|
|
304
305
|
|
|
305
306
|
---
|
|
306
307
|
|
|
308
|
+
### `cn label`
|
|
309
|
+
|
|
310
|
+
Apply existing labels to issues and pull requests, or get ranked label suggestions from content. All operations are non-interactive and automation-friendly.
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
# Apply one or more labels to an issue
|
|
314
|
+
cn label add --issue 42 bug,enhancement
|
|
315
|
+
|
|
316
|
+
# Apply labels with spaces in their names (no quotes needed in most shells)
|
|
317
|
+
cn label add --issue 42 bug,good first issue
|
|
318
|
+
|
|
319
|
+
# Apply labels to a PR
|
|
320
|
+
cn label add --pr 7 enhancement,needs triage
|
|
321
|
+
|
|
322
|
+
# Get ranked label suggestions for an issue
|
|
323
|
+
cn label suggest --issue 42
|
|
324
|
+
|
|
325
|
+
# Get ranked label suggestions for a PR
|
|
326
|
+
cn label suggest --pr 7
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
**Label source strategy:**
|
|
330
|
+
1. Repository labels are fetched once and cached locally (`.git/contribute-now/labels.json`).
|
|
331
|
+
2. If the repository labels are a 100% name-match against the [Clean Labels](https://github.com/wgtechlabs/clean-labels) dataset, Clean Labels (with canonical descriptions) are used as the source.
|
|
332
|
+
3. Otherwise, repository-specific labels are used.
|
|
333
|
+
4. The local cache is used by default — no repeated `gh` API calls.
|
|
334
|
+
5. On label-not-found errors, the cache is automatically resynced and the operation is retried once.
|
|
335
|
+
|
|
336
|
+
**Label input format:**
|
|
337
|
+
- Commas are the separator between labels.
|
|
338
|
+
- Spaces are part of a label name (`good first issue` is one label, not three words).
|
|
339
|
+
- Unknown labels are reported with close-match suggestions.
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
307
343
|
## AI Features
|
|
308
344
|
|
|
309
|
-
All AI features are
|
|
345
|
+
All AI features are **optional** — every command has a manual fallback. Three providers are supported: **GitHub Copilot**, **Ollama Cloud**, and **OpenRouter**.
|
|
310
346
|
|
|
311
347
|
| Command | AI Feature | Fallback |
|
|
312
348
|
|---------|------------|----------|
|
|
@@ -316,7 +352,17 @@ All AI features are powered by **GitHub Copilot** via `@github/copilot-sdk` and
|
|
|
316
352
|
| `update` | Conflict resolution guidance | Standard git instructions |
|
|
317
353
|
| `submit` | Generate PR title and body | `gh pr create --fill` or manual |
|
|
318
354
|
|
|
319
|
-
Pass `--no-ai` to any command to skip AI entirely. Use `--model <name>` to select a specific
|
|
355
|
+
Pass `--no-ai` to any command to skip AI entirely. Use `--model <name>` to select a specific model (e.g., `gpt-4.1`, `claude-sonnet-4`).
|
|
356
|
+
|
|
357
|
+
### AI Providers
|
|
358
|
+
|
|
359
|
+
| Provider | Auth | How it works |
|
|
360
|
+
|----------|------|--------------|
|
|
361
|
+
| **GitHub Copilot** *(default)* | `gh auth login` | Uses your existing GitHub/Copilot auth via the `@github/copilot-sdk` |
|
|
362
|
+
| **Ollama Cloud** | API key (stored in local secrets) | OpenAI-compatible API; model list fetched from your key on setup |
|
|
363
|
+
| **OpenRouter** | API key (stored in local secrets) | Unified API that routes to many model providers (OpenAI, Anthropic, Google, etc.) |
|
|
364
|
+
|
|
365
|
+
Select your provider during `cn setup` or change it later with `cn config --edit`. API keys for Ollama Cloud and OpenRouter are stored as plain JSON in `~/.contribute-now/secrets/store.json` with file permissions restricted to the current user (mode 0600) — never in the plain config file.
|
|
320
366
|
|
|
321
367
|
---
|
|
322
368
|
|