adr-tools icon indicating copy to clipboard operation
adr-tools copied to clipboard

How do I create my own personal default init 0001?

Open simkimsia opened this issue 6 years ago • 8 comments

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 😄

simkimsia avatar Jan 17 '19 08:01 simkimsia

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.

npryce avatar Jan 17 '19 09:01 npryce

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?

stephlag avatar Jan 17 '19 09:01 stephlag

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 [email protected] 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 .

npryce avatar Jan 17 '19 10:01 npryce

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?

simkimsia avatar Jan 17 '19 10:01 simkimsia

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 [email protected] 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 .

npryce avatar Jan 17 '19 10:01 npryce

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.

simkimsia avatar Jan 17 '19 11:01 simkimsia

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 [email protected] 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 .

npryce avatar Jan 17 '19 11:01 npryce

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.

simkimsia avatar Jan 18 '19 03:01 simkimsia