From 0ba532c44ae2e1d11277a4c797a43e2a4f66d5d8 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Tue, 25 Jul 2023 20:44:53 -0400 Subject: [PATCH] repository: update commit format, migrate to markdown --- Repository.org | 119 ------------------------------------------------- repository.md | 36 +++++++++++++++ 2 files changed, 36 insertions(+), 119 deletions(-) delete mode 100644 Repository.org create mode 100644 repository.md diff --git a/Repository.org b/Repository.org deleted file mode 100644 index eb44af3..0000000 --- a/Repository.org +++ /dev/null @@ -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. diff --git a/repository.md b/repository.md new file mode 100644 index 0000000..c7ed594 --- /dev/null +++ b/repository.md @@ -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