Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only add commit prefix if branch name matches regex pattern (#3703)
- **PR Description** Currently if a branch name does not match a regex pattern defined in the config.yaml (commitPrefix/es) the commit message box is populated with the branch name as is - this does not match expectations. A prefix should only be added if there is a match on the regex pattern. This PR seeks to change that by checking for a match before calling ReplaceAllString - see Issue #3695 - **Please check if the PR fulfills these requirements** * [x] Cheatsheets are up-to-date (run `go generate ./...`) * [x] Code has been formatted (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting)) * [x] Tests have been added/updated (see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md) for the integration test guide) * [-] Text is internationalised (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation)) * [-] Docs have been updated if necessary * [x] You've read through your own file changes for silly mistakes etc
- Loading branch information