From c7ac28909ea4a04e6d29c846351179d35a68e74b Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Wed, 12 Jan 2022 15:28:04 -0500 Subject: [PATCH] docs(Repository): add Repository documentation --- Repository.org | 115 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 Repository.org diff --git a/Repository.org b/Repository.org new file mode 100644 index 0000000..44b7624 --- /dev/null +++ b/Repository.org @@ -0,0 +1,115 @@ +#+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 =dump= with =revert= then downgrading flake inputs. + +#+BEGIN_SRC commit +bump: [flake inputs|INPUT] +#+END_SRC + +*** =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.