repository: update commit format, migrate to markdown
This commit is contained in:
parent
07216e2fa3
commit
0ba532c44a
2 changed files with 36 additions and 119 deletions
119
Repository.org
119
Repository.org
|
@ -1,119 +0,0 @@
|
||||||
#+TITLE: Repository Regulations
|
|
||||||
|
|
||||||
* Commit Messages
|
|
||||||
|
|
||||||
Adopted from [[https://www.conventionalcommits.org/en/v1.0.0/][conventional commits]] and [[https://docs.doomemacs.org/latest/?#/developers/conventions/git-commits][Doom Emacs' variant]]
|
|
||||||
|
|
||||||
#+BEGIN_SRC
|
|
||||||
TYPE[!][(scope)]: SUBJECT
|
|
||||||
|
|
||||||
[BODY]
|
|
||||||
|
|
||||||
[FOOTER]
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Types
|
|
||||||
|
|
||||||
*** =bump=
|
|
||||||
|
|
||||||
For updating inputs/packages, and any changes required to maintain working order post-update. Replace =bump= with =revert= then downgrading flake inputs.
|
|
||||||
|
|
||||||
#+BEGIN_SRC commit
|
|
||||||
bump: [flake inputs|INPUT]
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
*** =chore=
|
|
||||||
|
|
||||||
A regular and necessary commit to update regularly-changed files, such as those including timestamps or state information.
|
|
||||||
|
|
||||||
*** =dev=
|
|
||||||
|
|
||||||
Work on project infrastructure and development tools: build scripts, repository config files (=.github/*=, =.direnv=, =.gitignore=, etc.)
|
|
||||||
|
|
||||||
*** =docs=
|
|
||||||
|
|
||||||
Changes to documentation, docstrings, or help output for =bud=.
|
|
||||||
|
|
||||||
*** =feat=
|
|
||||||
|
|
||||||
For changes that introduce a new feature, a major UI/UX change, etc.
|
|
||||||
|
|
||||||
Changes that are minor should use the =tweak= type.
|
|
||||||
|
|
||||||
*** =fix=
|
|
||||||
|
|
||||||
A fix for a bug or behavior. Also used for updating code missed by the last dump.
|
|
||||||
|
|
||||||
*** =merge=
|
|
||||||
|
|
||||||
A merge commit, merging a pull request or branch.
|
|
||||||
|
|
||||||
- Never specify a scope
|
|
||||||
- The bang is meaningless
|
|
||||||
- The ~SUMMARY~ should only contain one or more pull request references/branch names
|
|
||||||
|
|
||||||
*** =module=
|
|
||||||
|
|
||||||
Reflects changes to the module list, such as adding, removing, renaming, or deprecating modules
|
|
||||||
|
|
||||||
- Not used for changes within modules
|
|
||||||
- Scope does after the colon
|
|
||||||
- If it is a user module, add =(user)= to the type.
|
|
||||||
|
|
||||||
#+begin_src
|
|
||||||
module: add desktop/gaming
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src
|
|
||||||
module: move services/xserver to desktop/display
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src
|
|
||||||
module: remove services/foldingathome
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src
|
|
||||||
module(user): add programs/blugon
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
*** =nit=
|
|
||||||
|
|
||||||
Small nitpick changes with no effect on the code, such as whitespace, formatting, or comments.
|
|
||||||
|
|
||||||
*** =refactor=
|
|
||||||
|
|
||||||
Changes to code that does not add a feature or fix a bug. Includes removing redundant code, simplifying code, renaming variables, or swapping a package for a near-enough drop-in replacement.
|
|
||||||
|
|
||||||
*** =revert=
|
|
||||||
|
|
||||||
For reverting changes. ~SUBJECT~ should be the full subject of the reverted commit. (Add =Revert HASH= in ~FOOTER~)
|
|
||||||
|
|
||||||
Rebase out commits where possible..
|
|
||||||
|
|
||||||
*** =test=
|
|
||||||
|
|
||||||
Changes to unit tests, but not testing infrastructure (use =dev= for that)
|
|
||||||
|
|
||||||
*** =tweak=
|
|
||||||
|
|
||||||
For minor UI/UX improvements/changes, or tweaks to variables/defaults with subtle or no user-facing changes.
|
|
||||||
|
|
||||||
** Breaking changes
|
|
||||||
|
|
||||||
1. Append a =!= (aka bang) to the ~TYPE~ to indicate a breaking change
|
|
||||||
2. Prepend =BREAKING CHANGE:= to ~BODY~, followed by an explanation of what is broken and how to get around it,
|
|
||||||
|
|
||||||
** Scope
|
|
||||||
|
|
||||||
The ~SCOPE~ should be one of the following:
|
|
||||||
- Module, without directory/category (=nit(gaming)=, =tweak(xserver)=)
|
|
||||||
- Directory without the module, implying all modules within (=feat(desktop)=, =fix(software)=)
|
|
||||||
- Arbitrary scope prefixed with ~&~ (=fix(&lutris)=, =dev(&doom)=)
|
|
||||||
- A host, prefixed with ~@~ (=fix(@Infini-FRAMEWORK)=)
|
|
||||||
- A user, prefixed with ~$~ (=feat($infinidoge)=)
|
|
||||||
- ~bud~, for changes to the =bud= command
|
|
||||||
- One or more of the above, separated with a comma. This is discouraged.
|
|
||||||
|
|
||||||
The scope may be omitted if:
|
|
||||||
- Using the =bump:=, =revert:=, =module:=, or =merge:= types. (Scope belongs in ~SUBJECT~)
|
|
||||||
- Is a change to global defaults, larger design decisions, etc.
|
|
36
repository.md
Normal file
36
repository.md
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
# Repository Notes
|
||||||
|
|
||||||
|
> **Note**
|
||||||
|
> These are a set of loose guidelines, that I am using as a reminder/general format for myself.
|
||||||
|
|
||||||
|
## Commit Message Format
|
||||||
|
|
||||||
|
```
|
||||||
|
[location/scope]: [subject]
|
||||||
|
|
||||||
|
[body]
|
||||||
|
|
||||||
|
[footer]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Locations
|
||||||
|
|
||||||
|
The location in a commit message represents where the change affects.
|
||||||
|
|
||||||
|
- A host (`Infini-DESKTOP`, etc.)
|
||||||
|
- A module (Just use the module name, not including `module` or `functionality` as a prefix, to reduce length)
|
||||||
|
- A profile
|
||||||
|
- `pkgs`
|
||||||
|
- `overlays`
|
||||||
|
- Etc.
|
||||||
|
|
||||||
|
If affecting multiple locations, separate with a comma.
|
||||||
|
If affecting all, use a `*`, like `hosts/*`.
|
||||||
|
If in a sub-location, separate with a slash, such as `overlays/patches`.
|
||||||
|
|
||||||
|
### Scopes
|
||||||
|
|
||||||
|
A scope is an abstract type of location, such as:
|
||||||
|
|
||||||
|
- `flake` for `flake.nix` or a flake-wide change
|
||||||
|
- `bump` for `flake.lock` updates
|
Loading…
Add table
Add a link
Reference in a new issue