datreeio / datree

Prevent Kubernetes misconfigurations from reaching production (again 😤 )! From code to cloud, Datree provides an E2E policy enforcement solution to run automatic checks for rule violations. See our docs: https://hub.datree.io
https://datree.io
Apache License 2.0
6.39k stars 363 forks source link

add documentation command #763

Closed TzlilSwimmer123 closed 1 year ago

TzlilSwimmer123 commented 2 years ago

Is your feature request related to a problem? Please describe. An easy way to open datree documentation

Describe the solution you'd like Adding documentation or docs command that will open a browser with datree documentation

Kanika637 commented 2 years ago

Hey @TzlilSwimmer123, can you tell me, how we can achieve this? I want to work on this issue

TzlilSwimmer123 commented 2 years ago

Hi @Kanika637

At the moment we have some commands like: test, config, publish. My suggestion is to add a new command that user can use like datree docs or datree documentation and this command will open datree docs link in the browser. The link https://hub.datree.io/

myishay commented 2 years ago

@Kanika637 We are using cobra as our commands framework. We also have an already implemented function openBrowser here that opens a browser with a given url. So, what you can do is to add a new command under the root command and use the openBrowser in this command. Since this function will not be only for test package anymore, it's location could be changed to pkg/utils for example and then you can use it both for test command and pkg/utils command. WDYT?

Kanika637 commented 2 years ago

Okay, I got it ! @myishay I have to add it in cmd>root.go right?

myishay commented 2 years ago

@Kanika637 correct!

The version command can be a good hint on how to implement the file structure etc.

amustaque97 commented 2 years ago

Hi there, looks like there is no active development on this issue. I can take it up.

TzlilSwimmer123 commented 2 years ago

@Kanika637 it seems like long time passed. You will have time to develop it or we can assign another contributor?

imrushi commented 2 years ago

Hi @TzlilSwimmer123, I am working on this issue to see if I can solve it. I have one question: the docs URL will be hardcoded or dynamic? If it is dynamic, from which place will I get the URL?

TzlilSwimmer123 commented 2 years ago

Hi @imrushi, @amustaque97 wanted this issue, @amustaque97 do you still want it?

amustaque97 commented 2 years ago

Hi @imrushi, @amustaque97 wanted this issue, @amustaque97 do you still want it?

Hey @TzlilSwimmer123, I have no issues if @imrushi wants to work on this. Please go ahead 🚀

imrushi commented 1 year ago

@TzlilSwimmer123, the docs URL will be hardcoded or dynamic? If it is dynamic, from which place will I get the URL?

Kanika637 commented 1 year ago

So sorry for the delay, you may assign it to someone else @TzlilSwimmer123.

TzlilSwimmer123 commented 1 year ago

@imrushi as mentioned above, the URL is: https://hub.datree.io 💪

TzlilSwimmer123 commented 1 year ago

@imrushi how is it going?

imrushi commented 1 year ago

Hi @TzlilSwimmer123, I have created PR but there were some changes. So I was stuck at the mocking browser for testing. It took me some time to figure it out. I have resolved it just waiting to get my PR review.