The Opinionated Digital Center's team has decided to use the Architecture Decision Record approach to record the reasoning behind the opinionated choices it makes (see ADR-0000).
Cross-cutting decisions are held in this repository (see
table of content), whereas project specific ADRs are held in
each project's docs/adr
directory.
To learn about ADRs, see:
Please note that:
- ADR uses the MADR template.
- Only one ADR must be proposed per feature branch (one file with name starting with
XXXX
).
The process is as follows:
-
Create a feature branch from
master
:git switch master git switch -c <your-feature-branch>
-
Create a new file in
docs/adr/
using the template in place:- The file name should follow the convention as detailed in
ADR-0001
("Positive consequences" section), with
XXXX
in place of its unique number (For exampleXXXX-use-markdown-architectural-decision-records.md
).
- The file name should follow the convention as detailed in
ADR-0001
("Positive consequences" section), with
-
Fill your ADR:
- Status line exists and is set to
proposal
. - Date line exists and is set to current date.
- Status line exists and is set to
-
Once finish, commit your work with message either (title follows MADR-0005-format):
-
When working on a repo dedicated to ADRs:
git commit -m 'feat(adr): <adr-title-in-lowercase>'
-
OR when working on a project's repo:
git commit -m 'docs(adr): <adr-title-in-lowercase>'
-
-
Push feature branch to Github:
git push --set-upstream origin <your-feature-branch>
-
Create a PR.
Once the PR is created, it will be reviewed and discussed.
On the PR branch:
-
Make sure you are on the correct feature branch and rebase to master:
git switch -c <your-feature-branch> git rebase master
-
Squash commits and rewrite commit message with (title follows MADR-0005-format):
-
When working on a repo dedicated to ADRs:
git reset --soft master && git commit -m 'feat(adr): <adr-title-in-lowercase>'
-
When working on a project's repo:
git reset --soft master && git commit -m 'docs(adr): <adr-title-in-lowercase>'
-
-
Update the following ADR content:
- Change ADR status to
approved
orrejected
. - Change ADR date to current date.
- Change ADR status to
-
Change ADR
.md
file name fromXXXX-<whatever-is-here>
to<next-available-id>-<adr-title-in-lowercase>
(follows MADR-0005-format). -
Force push your feature branch:
git push -f
-
merge the PR.
Pull merge code from GitHub and remove your feature branch:
git switch master
git pull origin
git remote prune origin
git branch -D <your-feature-branch>