npm update - #1
Merged
Merged
Conversation
Adiciona o arquivo LICENSE com a Licença ISC para formalizar os termos de uso e distribuição do projeto. Atualiza os arquivos README em inglês e português para incluir uma seção de licença e um link para o novo arquivo.
A inteligência artificial agora recebe o nome da branch atual como contexto, permitindo gerar sugestões de commit mais relevantes e contextualizadas. Atualiza as interfaces `IAIService` e `GitService` para suportar a nova funcionalidade e implementa o método `getBranchName` no `GitService`. Adiciona um novo workflow de Continuous Delivery para automatizar a publicação no NPM ao fazer push para a branch `main`. O workflow de Continuous Integration foi atualizado para ser executado também na branch `dev`, garantindo testes em novas features. Testes foram adicionados e atualizados para cobrir as novas funcionalidades nos serviços de AI e Git.
There was a problem hiding this comment.
Pull request overview
This PR adds support for including branch name context in AI-generated commit messages and sets up npm publishing infrastructure. The changes enable GitMind to pass the current git branch name to the AI service, helping generate more context-aware commit messages.
Key Changes:
- Added
getBranchName()method to GitService to retrieve the current git branch - Updated AI service to accept optional branch name parameter and include it in prompts
- Added CI/CD workflows for automated testing and npm publishing with ISC license
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/services/git.service.ts | Implements getBranchName() method to retrieve current branch with error handling |
| src/services/ai.service.ts | Adds optional branchName parameter to generateCommitMessage() and includes it in AI prompt |
| src/core/types.ts | Updates interface signatures for generateCommitMessage() and adds getBranchName() to GitService |
| src/commands/gen.ts | Retrieves branch name and passes it to AI service for commit message generation |
| tests/services/git.service.test.ts | Adds test coverage for getBranchName() method with success and error scenarios |
| tests/services/ai.service.test.ts | Updates test to verify branch name is included in AI prompt |
| .github/workflows/ci.yml | Updates CI to run on dev branch in addition to main |
| .github/workflows/cd.yml | Adds automated npm publishing workflow triggered on main branch pushes |
| LICENSE | Adds ISC license file with 2025 copyright |
| README.md | Adds npm version badge and license section |
| README.pt-BR.md | Adds npm version badge and license section (Portuguese) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```bash | ||
| npm start -- gen | ||
| ``` | ||
| ## License\n\nThis project is licensed under the [ISC License](./LICENSE). |
There was a problem hiding this comment.
The license section contains a literal \n\n escape sequence instead of actual line breaks. This will render as text rather than creating proper spacing. Remove the escape sequence and use actual line breaks.
Suggested change
| ## License\n\nThis project is licensed under the [ISC License](./LICENSE). | |
| ## License | |
| This project is licensed under the [ISC License](./LICENSE). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.