Commit Graph
209 Commits
Author SHA1 Message Date
sankalp c4992cce57 formating 2026-06-16 15:05:07 +05:45
sankalp 957dda9d49 refactor: remove jinja2 dependency, use simple template engine
- Replace jinja2 with custom render_template() helper
- Support {{ var }} substitution and {% if %}...{% endif %} conditionals
- Remove jinja2 from pyproject.toml and requirements.txt
- Simplifies dependency tree and reduces install size
2026-06-16 14:58:25 +05:45
sankalp 869aa37f0c update 2026-06-16 14:45:55 +05:45
sankalp 51ede1a7da fix: address 7 security and reliability issues
- Prevent path traversal in gitignore template names (Critical)
- Fix TOCTOU races in file operations with try/except pattern (High)
- Add timeout to HuggingFace API requests (Medium)
- Add missing %x00 separator in changelog fallback format (Medium)
- Filter unsanitized kwargs before passing to OpenAI SDK (High)
- Use context managers for proper client cleanup in providers (High)
- Exit with non-zero code on commit engine failure (Low)
2026-06-16 14:43:52 +05:45
sankalp ede489c219 fix: resolve 8 bugs affecting real users
- Fix KeyError 'root' in FileGrouper when merging groups with no root-level files
- Fix changelog commit parsing breaking on multiline bodies (use %x00 separator)
- Add empty choices/content checks in OpenAI, Anthropic, OpenRouter providers
- Fix config edit crash when config is empty
- Fix validate command using wrong color for 'no staged files'
- Add type check for corrupted YAML config (non-dict returns empty dict)
2026-06-16 14:36:19 +05:45
sankalp a56fe0a6ee update 2026-06-13 15:17:42 +05:45
sankalp e13e763cf2 chore(.github/workflows): upgrade dependency-review-action to v4.6.0
Upgrade to the latest stable version to receive security fixes and new features.
2026-06-13 15:16:22 +05:45
sankalp 79294f1df0 Merge pull request #61 from S4NKALP/dependabot/pip/main/openai-2.41.1
build(deps): bump openai from 2.41.0 to 2.41.1
2026-06-13 15:15:43 +05:45
sankalp 187ad00e99 Merge branch 'main' into dependabot/pip/main/openai-2.41.1 2026-06-13 15:15:19 +05:45
sankalp 35e02ddf7d Merge pull request #60 from S4NKALP/dependabot/pip/main/pre-commit-4.6.0
build(deps): bump pre-commit from 4.5.0 to 4.6.0
2026-06-13 15:14:51 +05:45
sankalp 93f09c9d74 Merge pull request #62 from S4NKALP/dependabot/pip/main/anthropic-0.109.1
build(deps): bump anthropic from 0.105.2 to 0.109.1
2026-06-13 15:14:34 +05:45
sankalp ab9527df33 Merge pull request #59 from S4NKALP/dependabot/pip/main/ruff-0.15.17
build(deps): bump ruff from 0.15.16 to 0.15.17
2026-06-13 15:14:13 +05:45
sankalp 186d952fda Merge pull request #58 from S4NKALP/dependabot/github_actions/main/github/codeql-action-4
build(deps): bump github/codeql-action from 3 to 4
2026-06-13 15:13:59 +05:45
sankalp deba25b055 Merge pull request #57 from S4NKALP/dependabot/github_actions/main/actions/dependency-review-action-5
build(deps): bump actions/dependency-review-action from 4 to 5
2026-06-13 15:13:40 +05:45
dependabot[bot] 9e6c846790 build(deps): bump actions/dependency-review-action from 4 to 5
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 4 to 5.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](https://github.com/actions/dependency-review-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-13 09:28:12 +00:00
sankalp f007c7c579 chore(.github/workflows):switch fail-on-scopes from changes to direct 2026-06-13 15:11:43 +05:45
dependabot[bot] 363b8ec398 build(deps): bump pre-commit from 4.5.0 to 4.6.0
Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 4.5.0 to 4.6.0.
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pre-commit/pre-commit/compare/v4.5.0...v4.6.0)

---
updated-dependencies:
- dependency-name: pre-commit
  dependency-version: 4.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-13 09:25:52 +00:00
dependabot[bot] 0c5ec5da0a build(deps): bump openai from 2.41.0 to 2.41.1
Bumps [openai](https://github.com/openai/openai-python) from 2.41.0 to 2.41.1.
- [Release notes](https://github.com/openai/openai-python/releases)
- [Changelog](https://github.com/openai/openai-python/blob/main/CHANGELOG.md)
- [Commits](https://github.com/openai/openai-python/compare/v2.41.0...v2.41.1)

---
updated-dependencies:
- dependency-name: openai
  dependency-version: 2.41.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-13 09:25:29 +00:00
dependabot[bot] 4f679bc90d build(deps): bump anthropic from 0.105.2 to 0.109.1
Bumps [anthropic](https://github.com/anthropics/anthropic-sdk-python) from 0.105.2 to 0.109.1.
- [Release notes](https://github.com/anthropics/anthropic-sdk-python/releases)
- [Changelog](https://github.com/anthropics/anthropic-sdk-python/blob/main/CHANGELOG.md)
- [Commits](https://github.com/anthropics/anthropic-sdk-python/compare/v0.105.2...v0.109.1)

---
updated-dependencies:
- dependency-name: anthropic
  dependency-version: 0.109.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-13 09:25:28 +00:00
dependabot[bot] f21b090b56 build(deps): bump ruff from 0.15.16 to 0.15.17
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.16 to 0.15.17.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.15.16...0.15.17)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.15.17
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-13 09:24:55 +00:00
dependabot[bot] 8c63406126 build(deps): bump github/codeql-action from 3 to 4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-13 09:24:51 +00:00
sankalp 91500f634a chore(.github/workflows): remove vuln-check-non-vulnerable-refs flag
Removed the flag that disabled vulnerability checks for non‑vulnerable refs; allow default security behavior.
2026-06-13 15:07:07 +05:45
sankalp cb3a1662d9 refactor(devgen/cli): reorder config merge to preserve key order
Preserves insertion order and prevents accidental overwriting of existing keys
2026-06-06 21:36:37 +05:45
sankalp 70e9068082 fix: None crash in providers, _merge_deepest loop, lock-file false positives, stage() race, cache TTL, config merge, changelog indent, template check V.0.2.8 2026-06-06 21:33:51 +05:45
sankalp fb87bfa146 fix: handle deleted files in stage() — use git rm for missing paths V.0.2.7 2026-06-06 21:21:10 +05:45
sankalp 69bd79e0fa bump version to 0.2.6 V.0.2.6 2026-06-06 20:57:00 +05:45
sankalp a86dcc93ee update readme V.0.2.5 2026-06-06 17:43:22 +05:45
sankalp 456040ed2b feat(root): revamp README and add gitignore/license commands
Updated project overview, removed emojis, and introduced new CLI subcommands for managing .gitignore and license templates. Added architecture and custom template documentation.

New Features
- Added `devgen gitignore list` and `devgen gitignore add <name> …` commands.
- Added `devgen license list` and `devgen license add <spdx>` commands.
- Introduced support for custom commit templates via `.tpl` files.

Enhancements
- Rewrote README with clearer description and updated badges.
- Removed emojis and streamlined formatting throughout documentation.
- Added sections for custom templates, architecture overview, and contribution guide.
- Clarified dependency installation and CI workflow references.

Bug Fixes
- Fixed formatting issues in badge links and stray hyphens.
- Resolved truncated documentation sections and improved readability.
2026-06-06 17:39:25 +05:45
sankalp df1d1765d1 ci: drop pyright typecheck job in favour of ruff
The project uses ruff for lint+format, and pyright was redundant and
slow. The previous pyright run surfaced ~30 false positives from running
outside the venv plus 5 real-but-minor typing issues that don't justify
the extra CI minutes on a 0.2.x CLI.

CI now runs only ruff check, ruff format --check, and the import/CLI
smoke matrix on 3.10/3.11/3.12/3.13.
2026-06-06 17:38:01 +05:45
sankalp 09ba5e9644 ci: add CodeQL, lint/typecheck/smoke CI, and dependency review
- ci.yml: ruff check + format check, pyright typecheck, and import/CLI
  smoke test on Python 3.10/3.11/3.12/3.13 matrix. Uses uv like the
  existing pre-commit workflow for consistency.
- codeql.yml: weekly + push/PR Python security-and-quality analysis.
- dependency-review.yml: fail PRs adding high+ severity CVEs or copyleft
  licenses that would taint GPL-3.0 (AGPL, SSPL, BUSL).
2026-06-06 17:31:31 +05:45
sankalp 850e88972e ci(dependabot): merge directly via squash instead of use-github-auto-merge
The previous config required branch protection with required status checks,
but main has no protection rules configured, so auto-merge never fired and
PRs had to be merged manually.

Switch to direct squash merge in the action itself, which works regardless
of branch protection settings.
2026-06-06 17:24:10 +05:45
sankalp 96e776f7cc chore(root):ignore .tpl files in Linguist language stats to prevent inflated language statistics. 2026-06-06 17:10:34 +05:45
sankalp f70b5208ec refactor(devgen/providers): shared provider base class
Abstract out generate validation and error handling into BaseProvider, eliminating duplicated logic across Anthropic, OpenRouter, and OpenAI providers.
2026-06-06 17:10:30 +05:45
sankalp e2ec269f16 refactor(modules): restructure changelog and release note generation
Refactor to improve readability and separate concerns,
use Section enum and ordered traversal for consistent output.
2026-06-06 17:10:30 +05:45
sankalp 90ca0c0f59 refactor(devgen/modules): rename commit_message template from .j2 to .tpl
Bug Fixes:
- Updated template reference to use .tpl extension, resolving missing template error.
2026-06-06 16:56:14 +05:45
sankalp 9781523e8e refactor(devgen/modules): streamline manifest context generation
Enhancements:
- Replaced verbose scanning of many manifest files with targeted parsing of key project manifests (pyproject.toml, package.json, requirements.txt).
- Generated a compact one‑line‑per‑file summary, reducing token usage.
- Improved clarity and readability of the AI‑provided context.
2026-06-06 16:48:28 +05:45
sankalp 96b2499ecf chore(devgen/templates/commit): streamline commit template to Conventional Commits format
Clarify output format and remove redundant guidance.

New Features:
- Added explicit format and type list

Enhancements:
- Simplified instructions, removed unnecessary guidance

Bug Fixes:
- None
2026-06-06 16:48:21 +05:45
sankalp 4f8e358a60 feat(devgen/modules): expose max_groups and max_diff_size as CLI override flags
- Add CLI flags to override `max_groups` and `max_diff_size` limits
- Update file grouping logic to respect override values
- Improve truncation logging with configurable size and guidance
- Remove unused imports and streamline rich console setup
2026-06-06 16:45:18 +05:45
sankalp 72c57f0d33 feat(devgen):add token limit error detection and friendly formatting utilities 2026-06-06 16:45:13 +05:45
sankalp 0b023482d7 feat(devgen/cli): introduce --max-groups and --max-diff-size options for commit command
Add limits to prevent token‑limit errors during commit generation.
- New `--max-groups` option to cap the number of commit groups.
- New `--max-diff-size` option to set maximum diff size per group (default 8000 chars).
Update logging to reflect the new options and pass them to the engine.
2026-06-06 16:45:07 +05:45
sankalp 8069895bc7 feat(devgen/providers): normalize token limit error handling
Add token limit error detection and formatting across all provider modules to surface clear diagnostics when context windows are exceeded, improving error messages and preventing silent failures.

New Features
- Introduce `is_token_limit_error` checks in Anthropic, Gemini, Hugging Face, Ollama, OpenAI, and OpenRouter providers.
- Use `format_token_limit_error` to generate user‑friendly error messages for token limit overs.

Enhancements
- Centralize token limit error handling for consistent diagnostics across providers.
- Explicitly re‑raise `RuntimeError` in Hugging Face to preserve original behavior.

Bug Fixes
- None
2026-06-06 16:45:05 +05:45
sankalp d991af9c47 feat(devgen/cli): introduce Ollamaprovider support and interactive host configuration
- Add "ollama" to AI provider choices in config prompts
- Prompt user for Ollama server URL when selecting the Ollama provider
- Store the configured Ollama host in the config under the "ollama_host" key
- Update config saving logic in both edit_config and setup_config functions
2026-06-06 16:31:09 +05:45
sankalp d8fcf0849a feat(root): add local Ollama AI model support
- New Features
  - Added Ollama as a supported AI model source.
  - Updated README and project manifests to include Ollama.

- Enhancements
  - Expanded AI model selection to handle local Ollama endpoints.
  - Improved dependency resolution for Ollama packages.

- Bug Fixes
  - None
2026-06-06 16:31:06 +05:45
sankalp aad3703ea3 feat(devgen/modules): add configurable Ollama host- New Features
- Added `ollama_host` configuration option.
- Enhancements
  - Use the configured host when calling the Ollama provider.
2026-06-06 16:31:02 +05:45
sankalp a8b48e9f07 feat(devgen/providers): add OllamaProvider for local Ollama integration
Add a new provider that wraps the local Ollama server using an OpenAI‑compatible client, enabling generation via `ollama_host` configuration. This introduces the first provider for local LLM inference.

New Features
- Implement OllamaProvider with a `generate()` method, supporting custom host, model selection, and robust error handling.
2026-06-06 16:30:56 +05:45
sankalp 7016cff3a7 feat(devgen): add Ollama provider and host configuration
Add support for the Ollama provider in the AI generation pipeline and expose a configurable host address.

New Features:
- Introduce `ollama` as a selectable provider.
- Add `ollama_host` configuration option with default `http://localhost:11434`.

Enhancements:
- Extend provider list in error message to include Ollama.
2026-06-06 16:30:52 +05:45
sankalp 55ebbaef15 feat(devgen/cli): improve version callback error messages
- Enhanced error messages when version cannot be determined, providing clearer guidance.
- Added explicit handling for missing pyproject.toml and TOML parsing errors.
- Improved user feedback for installation corruption issues.
2026-06-06 16:27:20 +05:45
sankalp 80f68a6ccd feat(devgen): enhance provider import error handling
Enhancements:
- Split ModuleNotFoundError and AttributeError handling to deliver clearer diagnostics
- Explicitly list available providers and flag missing provider classes as packaging bugs

Bug Fixes:
- Provide specific guidance when a provider module is not a built‑in module
- Clarify that a missing provider class indicates a packaging issue rather than user error
2026-06-06 16:27:17 +05:45
sankalp fd3ce03484 feat(devgen/modules): categorize committypes and improve changelog/release note formattingAdd separate categories for Performance, Refactor, Tests, Style, and Chore; update ordering and emojis; improve remote push detection and fetch strategy; enhance error logging.
- New Features  - Introduced distinct sections for Performance, Refactor, Tests, Style, and Chore in changelog generation.
  - Added dedicated emojis for each new category.
  - Updated section ordering to reflect the new categories.
- Enhancements
  - Enhanced push logic to fetch upstream before push, avoiding non‑fast‑forward rejections.
  - Refactored `is_ahead_of_remote` with a fetch flag to reduce network calls and TOCTOU windows.
  - Improved error logging with full traceback for group processing failures.
- Bug Fixes
  - Fixed emoji mappings for "Style" and "Other Changes".
  - Corrected handling of empty upstream ref to prevent errors.
  - Ensured proper exception handling when remote branch is missing.
2026-06-06 16:27:12 +05:45
sankalp 51d2b7549f feat(devgen/providers):improve provider error handling and response parsing 2026-06-06 16:27:03 +05:45