npryce / adr-tools

Command-line tools for working with Architecture Decision Records
Other
4.56k stars 578 forks source link

Make the adr-config configurable, per user, per project. #58

Closed bcolferzd closed 6 years ago

bcolferzd commented 6 years ago

We are collaborating on several teams each with their own requirements for ADR specifications. We would like to use a .adr-config in the current directory, then ~/.adr-config and then use the system wide package adr in $(directory $0)/adr-config

npryce commented 6 years ago

The adr-config script is not intended for users but for downstream packaging projects that package the application for various software distribution channels (Homebrew, APT, RPM and so forth).

If you want a per-project template, create a file named template.md in the ADR directory.

If you want the ADR directory to be at a different location, pass the directory you want to the adr init command.

bcolferzd commented 6 years ago

If I am working with multiple teams each with their own template. We think it would be valuable for the project to define the template in the project repository.

npryce commented 6 years ago

@bcolferzd you can do that, as described in the first comment

aurerua commented 5 years ago

@bcolferzd I have tried it and it did not work.

Steps taken:

  1. Check that the .adr-dir at the root of the project points to doc/architecture/decisions.
  2. Save a template.md file in doc/architecture/decisions/ that contains the default template + one section (called 'More' in this example below):
# NUMBER. TITLE

Date: DATE

## Status

STATUS

## Context

The issue motivating this decision, and any context that influences or constrains the decision.

## Decision

The change that we're proposing or have agreed to implement.

## Consequences

What becomes easier or more difficult to do and any risks introduced by the change that will need to be mitigated.

## More

Some text.
  1. run adr new test record.
  2. it opens the default template, not the one I defined.
cmygray commented 1 year ago

@aurerua

A template file should be placed in ADR_DIR/templates/ not in ADR_DIR/. So the correct path is doc/architecture/decisions/templates/template.md

source code:

https://github.com/npryce/adr-tools/blob/b3279baf9be2207d1a4f4bbd608fd0b591c72aee/src/adr-new#L14