adr
adr copied to clipboard
Feature Idea: support for multiple ADR locations
I was looking at adding support for multiple ADR locations for users who need to support more than one ADR location. Would you be interested in me opening PRs on this?
at this time I was thinking of extending the current configuration to support a slice or map of repositories. (probably a map as that provides a useful shortName lookup method)
Currently the config schema looks like this.
{
"base_directory": "$ADRLOCATION",
"current_id": 1
}
{
"version": "v$n",
"default": "Remembrancer",
"repositories": {
"Advocator": {
"base_directory": "dir1"
},
"Deadline": {
"base_directory": "dir1"
},
"Remembrancer": {
"base_directory": "dir1"
}
}
}
New fields
- version: This tag would be used for future schema migrations.
- default: Instead of the root base_directory this value would allow the current behaviours to be replicated with an automated upgrade.
- repositories: A map of all repositories.
- The short reference name for each repository
- base_directory the local directory containing the repository
- The short reference name for each repository
I would replace current_id with a directory scan as this is likely to work for most use cases. when running the new version of the binary it should migrate the configuration to the newer version.
As part of this i would add an add
command to add an already existing repository to your local config.
adr add /home/user/my_other_adrs
In the future I want to look at adding per repository templates and potentially config files.
@kcollasarundell That's a good idea, and I would like to see and review your PRs but I've got some remarks :
- The default behavior should stay the same, i.e. users doing
adr init /folder/...
should worry about multiple locations, it should just work as before - Locations should come as a nice to have feature, the basic API should stay the same
Tag me in PRs and I'll make to test & review.
Thanks
Will do
I had the same problem. My train of thoughts: Why don't we add a .adr/ to each and every project?