You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat(config): ability to predefine scopes
* docs(CHANGELOG): update changelog
* fix(scopes): allow selecting no scope
* docs(README): update readme with scopes info
* refactor(scopes): change the label for no scopes
* chore(README): move warning to before block
Copy file name to clipboardExpand all lines: README.md
+43-10Lines changed: 43 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -4,18 +4,22 @@
4
4
<h5>Meteor is a simple, highly customisable CLI tool that helps you to write <ahref="https://www.conventionalcommits.org/">conventional commits</a> with git.</h5>
5
5
</div>
6
6
7
-
8
-
You can call `meteor` where you'd normally type `git commit`. All flags supported in `git commit` will still work.
7
+
You can call `meteor` where you'd normally type `git commit`. All flags
8
+
supported in `git commit` will still work.
9
9
10
10

11
11
12
12
## Installation
13
+
13
14
### Homebrew
15
+
14
16
```console
15
17
brew tap stefanlogue/tools
16
18
brew install meteor
17
19
```
20
+
18
21
### Go
22
+
19
23
Install with Go (1.21+):
20
24
21
25
```console
@@ -26,8 +30,13 @@ Or grab a binary from [the latest release](https://github.com/stefanlogue/meteor
26
30
27
31
## Customisation
28
32
29
-
You can customise the options available by creating a `.meteor.json` file anywhere in the directory tree (at or above the current working directory). The config file closest to the current working directory will be preferred. This enables you to have different configs for different parent directories, such as one for your personal work, one for your actual work, one for open source work etc.
30
-
For global configurations you can create a `config.json` file in the `~/.config/meteor/` directory.
33
+
You can customise the options available by creating a `.meteor.json` file
34
+
anywhere in the directory tree (at or above the current working directory). The
35
+
config file closest to the current working directory will be preferred. This
36
+
enables you to have different configs for different parent directories, such as
37
+
one for your personal work, one for your actual work, one for open source work
38
+
etc. For global configurations you can create a `config.json` file in the
39
+
`~/.config/meteor/` directory.
31
40
32
41
### Boards
33
42
@@ -53,7 +62,9 @@ The content should be in the following format:
53
62
}
54
63
```
55
64
56
-
If you use boards (Jira etc) but need a way to have commits without one, add the following to the `boards` array:
65
+
If you use boards (Jira etc) but need a way to have commits without one, add the
66
+
following to the `boards` array:
67
+
57
68
```json
58
69
{
59
70
"boards": [
@@ -63,8 +74,25 @@ If you use boards (Jira etc) but need a way to have commits without one, add the
63
74
}
64
75
```
65
76
77
+
If you want to define a set of predefined scopes to select from rather than
78
+
typing the scope, a `scopes` array can be added to your config:
79
+
80
+
> [!WARNING]
81
+
> Setting predefined scopes removes the ability to type the scope
82
+
83
+
```json
84
+
{
85
+
"scopes": [
86
+
{ "name": "scope1" },
87
+
{ "name": "scope2"}
88
+
]
89
+
}
90
+
```
91
+
66
92
### Message Templates
67
-
If the default commit message templates aren't exactly what you're looking for, you can provide your own! The syntax can be seen in the defaults below:
93
+
94
+
If the default commit message templates aren't exactly what you're looking for,
95
+
you can provide your own! The syntax can be seen in the defaults below:
68
96
69
97
```json
70
98
{
@@ -74,14 +102,19 @@ If the default commit message templates aren't exactly what you're looking for,
74
102
```
75
103
76
104
`messageTemplate` needs to have:
77
-
-`@type`: the conventional commit type i.e. `feat`, `chore` etc.
78
-
-`@message`: the commit message
79
-
-`(@scope)`: (optional but recommended) the scope of the commit, must be within parentheses
105
+
106
+
-`@type`: the conventional commit type i.e. `feat`, `chore` etc.
107
+
-`@message`: the commit message
108
+
-`(@scope)`: (optional but recommended) the scope of the commit, must be within
109
+
parentheses
80
110
81
111
`messageWithTicketTemplate` also additionally takes `@ticket`
82
112
83
113
### Intro
84
-
If you want to skip the intro screen to save a keypress, add the following to your config:
114
+
115
+
If you want to skip the intro screen to save a keypress, add the following to
0 commit comments