Skip to content

Latest commit

 

History

History
188 lines (135 loc) · 3.75 KB

docs.adoc

File metadata and controls

188 lines (135 loc) · 3.75 KB

Documentation of 🔥FireCommit

Default Start

Start

When the scrip starts, you see something similar to this:

🔥FireCommit - V.6.2
[CHECK]:  (i) Successful.
[CHECK]:  (i) Successful.
[CHECK]:  (i) Successful.
[CHECK]:  (i) Successful.
[CWD]:    ... your current working directory
[OPTION]: 0:start | 1:abort
[0|1]: 1

Type 0 for actually starting and 1 for quitting.

NOTE: The checks run to make sure that the two json-files are present and that the working directory is a git-repository.

Next

Next, it depends on how your commit-message is structured. The default one will print out:

[topics]:
  ..0:FIX(✅)
  ..1:TEST(🛡️)
  ..2:MILE(💎)
  ..3:REL(🎆)
  ..4:DOCS(📓)
  ..5:CONN(🔗)
  ..6:REF(🔪)
  ..7:ARCHI(🏬)
  ..8:INFRA(🎛️)
  ..9:INIT(🏹)
  ..10:UP(⬆️)
  ..11:STYLE(🪟)
  ..12:FEAT(🎉)
  ..13:PERF(💯)
  ..14:CORE(🌣)
  ..15:REV(♻️)
[SELECT]:

Type 0,1 or other numbers.

Then, it will print out:

[INPUT]:

Now you can type some keywords.

Done

When you’re done, the script will print out:

[OPTION]: 0:show | 1:save | 2:commit | 3:abort.

You can see the full message printed out (0), you can save it to a .txt-file (1), you can commit (2) or you can abort (3) (exits the script).

When you’re finally done, the script will start a new round (If you are familiar with Python and you don’t like this behaviour, you can change that in the main-function in FireCommit.py).

Finally Done

If you abort, you will see something like this:

[LOG]: Stopping...
🔥FireCommit Exited

Modifications

You may want to modify the commit structure. To do this, you have to modify the file msgstruct.json.

NOTE: There are two [ examples ] that show how this is done.

  • The content of the json file will be loaded and stored in a dictionary.

  • The first attribute should be:

"name":"your_template_name",
  • Now you can structure your message:

Options

  • To select an option out of several possibilities, use:

"some_name":"[option1,option2,option3,...]",

Seperators

  • To use a seperator (like comma, semicolon, …​), use

"Seperator":"some_seperator",
  • JSON-files contain key-value-pairs. So if you want to have more then one seperator in your file, you have to name them like (it has to start with "Seperator…​"):

"Seperator":"some_seperator",
...
"Seperator2":"some_seperator",
...
"Seperator3":"some_seperator",

Line Break

  • To get a line break / blank line, use

"blank":"",
  • JSON-files contain key-value-pairs. So if you want to have more then one blank line in your file, you have to name them like (it has to start with "blank…​"):

"blank":"",
...
"blank2":"",
...
"blank3":"",

Keyboard Input

  • To get keyboard input from the user, use

"some_name":"input"
  • NOTE: The value "input" has to be named liked that. Do not use a different name.

Date & Time & Mods

  • To get the current date, use

"date":"",
  • To get the current time, use

"time":"",
  • To get modifications from git (git diff --staged --stat), use

"mods":"",

NOTE: All of these three commands can only be used once in the message. Moreover, they have to be named exactly like that. For an example, click here.

→ After the JSON-file has been saved, start the script. It automatically loads the new changes.