-
Notifications
You must be signed in to change notification settings - Fork 50
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
ci(i): Add check to keep table of contents up-to-date #2693
ci(i): Add check to keep table of contents up-to-date #2693
Conversation
ce546e3
to
c8c7da6
Compare
@fredcarle no more |
question: What made you chose to do this? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2693 +/- ##
===========================================
+ Coverage 77.91% 77.98% +0.08%
===========================================
Files 308 308
Lines 23134 23134
===========================================
+ Hits 18023 18041 +18
+ Misses 3723 3711 -12
+ Partials 1388 1382 -6
Flags with carried forward coverage won't be shown. Click here to find out more. see 6 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
@@ -0,0 +1,421 @@ | |||
#!/usr/bin/env bash | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: 😅 Please never ask me to maintain this file. Are we really sure this is worth it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You/we don't have to. I been using this for a few years now and has 3.2k stars. Is a keep it and forget it kind of thing IMO.
Worst case scenario, if something does break, we copy the new version with the fix and replace this script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is copy-pasted as-is? No changes from the source? Why have we copy pasted it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is copy-pasted as-is? No changes from the source?
yes. yes no changes.
Why have we copy pasted it?
Is a simple bash script. Is going to be painful to have devs manually download and making sure they have same version etc (specially if there are formatting changes between versions).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The readme pasted in suggests that we wouldn't need devs to manually download it (unless maybe it requires sudo?)
It also looks like the script doesn't work on windows:
If you want it on Windows, you better to use a golang based implementation
todo: Why don't we just use the go version instead of the mac/linux-only bash script, then we wont need to copy-paste code about?
go install "github.com/ekalinin/github-markdown-toc.go/cmd/gh-md-toc@latest"
etc...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't used the go version of the tool personally before, I wonder if formatting and everything else is the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried switching to the go project, but sadly the go project is missing the insert
option, and only generates the table of contents (i.e. doesn't update it automatically). So will prefer the current approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sourcenetwork/database-team Please chime in if you have any other suggestions regarding the copy-paste and lack of window dev tool support (or another tool). Happy to follow the consensus.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we never have to maintain this, I don't really care that we just copy-pasted it. I also don't think it's a big deal that it doesn't work on windows. Devs on windows can just manually edit if they have to. If someone what's to contribute to the go version to include insert, we can switch to the go version when it's supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we never have to maintain this, I don't really care that we just copy-pasted it. I also don't think it's a big deal that it doesn't work on windows. Devs on windows can just manually edit if they have to. If someone what's to contribute to the go version to include insert, we can switch to the go version when it's supported.
I am okay with this! I have subscribed to the issue, if it gets implemented happy to migrate to using go version of the tool.
No hard pref or reason just some minor ones, seems nicer to have all documentation jobs in one workflow file (they still behave in parallel manner and can be controlled granularly to make required or not as that is based on the job name.) One nitpicky thing I like is that the github check mark will show: Everything remains the same, except we loose the ability to configure the trigger ( If there is a hard pref to keep them in separate workflow files lmk, as mentioned I am in different. |
No real preference from me at all atm :) I was just curious :) Thanks for the explanation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please fix the table of content header syntax before merging.
@@ -0,0 +1,421 @@ | |||
#!/usr/bin/env bash | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we never have to maintain this, I don't really care that we just copy-pasted it. I also don't think it's a big deal that it doesn't work on windows. Devs on windows can just manually edit if they have to. If someone what's to contribute to the go version to include insert, we can switch to the go version when it's supported.
c8c7da6
to
43c08ef
Compare
This reverts commit d9f2b90.
43c08ef
to
a4cd76a
Compare
Relevant issue(s)
Resolves #2692
Description
How has this been tested?
act
toolAction-run: https://github.com/sourcenetwork/defradb/actions/runs/9417618174/job/25943201802?pr=2693
Specify the platform(s) on which this was tested: