|
| 1 | +# NOTE: this is my personal config file for lazygit, the best git client |
| 2 | +# INFO: commitizen integration teaked from https://github.com/jesseduffield/lazygit/issues/41 thanks |
| 3 | +# to https://github.com/leikoilja |
| 4 | + |
| 5 | +# yamllint disable rule:line-length |
| 6 | +--- |
| 7 | +gui: |
| 8 | + nerdFontsVersion: "3" |
| 9 | +customCommands: |
| 10 | + - key: "C" |
| 11 | + command: 'git commit -m "{{ .Form.Type }}{{if .Form.Scopes}}({{ .Form.Scopes }}){{end}}{{if eq .Form.Breaking |
| 12 | + `yes`}}!{{end}}: {{ .Form.Description }}"' |
| 13 | + description: "commit with commitizen" |
| 14 | + context: "files" |
| 15 | + prompts: |
| 16 | + - type: "menu" |
| 17 | + title: "Select the type of change you are committing." |
| 18 | + key: "Type" |
| 19 | + options: |
| 20 | + - name: "Feature" |
| 21 | + description: "A new feature" |
| 22 | + value: "feat" |
| 23 | + - name: "Fix" |
| 24 | + description: "A bug fix" |
| 25 | + value: "fix" |
| 26 | + - name: "Documentation" |
| 27 | + description: "Documentation only changes" |
| 28 | + value: "docs" |
| 29 | + - name: "Styles" |
| 30 | + description: "Changes that do not affect the meaning of the code (white-space, formatting, |
| 31 | + missing semi-colons, etc)" |
| 32 | + value: "style" |
| 33 | + - name: "Code Refactoring" |
| 34 | + description: "A code change that neither fixes a bug nor adds a feature" |
| 35 | + value: "refactor" |
| 36 | + - name: "Performance Improvements" |
| 37 | + description: "A code change that improves performance" |
| 38 | + value: "perf" |
| 39 | + - name: "Tests" |
| 40 | + description: "Adding missing tests or correcting existing tests" |
| 41 | + value: "test" |
| 42 | + - name: "Builds" |
| 43 | + description: > |
| 44 | + Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, |
| 45 | + npm) #magic___^_^___line |
| 46 | + value: "build" |
| 47 | + - name: "Continuous Integration" |
| 48 | + description: "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, |
| 49 | + BrowserStack, SauceLabs)" |
| 50 | + value: "ci" |
| 51 | + - name: "Chores" |
| 52 | + description: "Other changes that don't modify src or test files" |
| 53 | + value: "chore" |
| 54 | + - name: "Reverts" |
| 55 | + description: "Reverts a previous commit" |
| 56 | + value: "revert" |
| 57 | + - type: "input" |
| 58 | + title: "Enter the scope(s) of this change." |
| 59 | + key: "Scopes" |
| 60 | + - type: "input" |
| 61 | + title: "Enter the short description of the change." |
| 62 | + key: "Description" |
| 63 | + - type: "menu" |
| 64 | + title: "Is this a breaking change?" |
| 65 | + key: "Breaking" |
| 66 | + options: |
| 67 | + - name: "No" |
| 68 | + description: "This change does not introduce a breaking change." |
| 69 | + value: "no" |
| 70 | + - name: "Yes" |
| 71 | + description: "This change introduces a breaking change." |
| 72 | + value: "yes" |
| 73 | + - type: "confirm" |
| 74 | + title: "Is the commit message correct?" |
| 75 | + body: "{{ .Form.Type }}{{if .Form.Scopes}}({{ .Form.Scopes }}){{end}}{{if eq .Form.Breaking `yes`}}!{{end}}: |
| 76 | + {{ .Form.Description }}" |
0 commit comments