npryce / adr-tools

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

How do I create my own personal default init 0001? #78

Open simkimsia opened 5 years ago

simkimsia commented 5 years ago

Hi @npryce , I discovered your adr-tools via ruthmalan. And now successfully using it in 3 existing projects and going on for more.

I like to ask if there's a way for me to change the default 0001 decision script without changing the code. Not looking to remove your existing content. but just to add 2 or 3 extra lines unique to my company under decision and context section.

Let me know roughly how and I be happy to try to make this my first contribution to your wonderful tool.

Thank you 🙏 with much ❤️ for your ADR tools 😄

npryce commented 5 years ago

At the moment there’s no hook in the tool itself. However, you could build a wrapper script that calls adr init and then modifies the first adr or overwrites it.

stephlag commented 5 years ago

We would also need to change the link in the default 0001 decision as this is not an https link ant the site does not look very active anymore. @npryce would it make sense to store Michael Nygard's paper in a github page and reference it in this "first" decision?

npryce commented 5 years ago

I could ask Michael Nygard if it would be ok to include the article text in the first ADR.

On Thu, 17 Jan 2019 at 09:47, Stephan L notifications@github.com wrote:

We would also need to change the link in the default 0001 decision as this is not an https link ant the site does not look very active anymore. @npryce https://github.com/npryce would it make sense to store Michael Nygard's paper in a github page and reference it in this "first" decision?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/npryce/adr-tools/issues/78#issuecomment-455108747, or mute the thread https://github.com/notifications/unsubscribe-auth/AADbm2aUMFTK7nDNVO2LVy4lUoomBfWBks5vEEbAgaJpZM4aEs95 .

simkimsia commented 5 years ago

At the moment there’s no hook in the tool itself. However, you could build a wrapper script that calls adr init and then modifies the first adr or overwrites it.

I have this thought.

adr init <argument abt the location of the adr folder> --different-init-url <url to a different init.md file>

So what happens is that the init command with the optional flag --different-init-url will use a different init.md

of course any variable used in your default init.md like DATE should still work in the different init.md

What's your thoughts?

npryce commented 5 years ago

I’m not keen on the tool making requests over the network, because of the much greater testing effort it will introduce.

If you want this, I suggest a wrapper script, or to distribute a customised packaging of the tool to developer workstations.

—Nat

On Thu, 17 Jan 2019 at 10:37, simkimsia notifications@github.com wrote:

At the moment there’s no hook in the tool itself. However, you could build a wrapper script that calls adr init and then modifies the first adr or overwrites it.

I have this thought.

adr init --different-init-url

So what happens is that the init command with the optional flag --different-init-url will pull a different init.md

of course any variable used in your default init.md like DATE should still work in the different init.md

What's your thoughts?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/npryce/adr-tools/issues/78#issuecomment-455124679, or mute the thread https://github.com/notifications/unsubscribe-auth/AADbm7JF-BOzMW_NK-WYxxvrNRQcZnpDks5vEFJ1gaJpZM4aEs95 .

simkimsia commented 5 years ago

I’m not keen on the tool making requests over the network, because of the much greater testing effort it will introduce.

Understood.

Do u mind if I try anyway in a separate fork? With tests as well. Out of purely intellectual curiosity.

Of course you are under no obligations to accept the PR and there's always the chance that I failed in my attempt.

If I fail, I will likely try the wrapper script option next.

npryce commented 5 years ago

Sure if you want but it’s not a feature I want to support. How about a file rather than an HTTP URL? Then you can store a common default file on a networked drive, and let the operating system handle security.

—Nat

On Thu, 17 Jan 2019 at 11:25, simkimsia notifications@github.com wrote:

I’m not keen on the tool making requests over the network, because of the much greater testing effort it will introduce.

Understood.

Do u mind if I try anyway in a separate fork? With tests as well.

Of course you are under no obligations to accept the PR and there's always the chance that I failed in my attempt.

If I fail, I will likely try the wrapper script option next.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/npryce/adr-tools/issues/78#issuecomment-455138709, or mute the thread https://github.com/notifications/unsubscribe-auth/AADbm13IeAM9FRIhpvsnVlGxpJojeg3uks5vEF3DgaJpZM4aEs95 .

simkimsia commented 5 years ago

How about a file rather than an HTTP URL? Then you can store a common default file on a networked drive, and let the operating system handle security.

That's a great idea too! I'll try that.

no guarantees if I succeed.