Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Idea: support for multiple ADR locations #4

Open
kcollasarundell opened this issue Oct 26, 2020 · 3 comments
Open

Feature Idea: support for multiple ADR locations #4

kcollasarundell opened this issue Oct 26, 2020 · 3 comments

Comments

@kcollasarundell
Copy link

kcollasarundell commented Oct 26, 2020

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

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.

@marouni
Copy link
Owner

marouni commented Oct 26, 2020

@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

@kcollasarundell
Copy link
Author

Will do

@wunderlicht
Copy link

I had the same problem. My train of thoughts: Why don't we add a .adr/ to each and every project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants