-
Notifications
You must be signed in to change notification settings - Fork 4
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
PMM-13361 format release notes #365
base: main
Are you sure you want to change the base?
Conversation
|
1 similar comment
|
|
|
README.md
Outdated
@@ -58,6 +58,14 @@ supported: | |||
`recommended` field holds a specific version. `supported` hold a semver constraint. | |||
|
|||
Making a request to `/metadata/v1/{product}` will return all stored metadata for the given product. | |||
## How to add new release notes for a product |
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.
## How to add new release notes for a product | |
## How to add new release notes for a product |
README.md
Outdated
## How to add new release notes for a product | ||
Add a file to `sources/release-notes/{product_name}/{version-tag}.md`. | ||
|
||
Making a request to `/release-notes/v1/{product}/{version-tag}` will return the release note for that version in raw markdown format. |
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.
let's move it to the end of this block
README.md
Outdated
Add a file to `sources/release-notes/{product_name}/{version-tag}.md`. | ||
|
||
Making a request to `/release-notes/v1/{product}/{version-tag}` will return the release note for that version in raw markdown format. | ||
You can also run `make format-release-notes` to format the release notes. This command will: |
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 can also run `make format-release-notes` to format the release notes. This command will: | |
Run `make format-release-notes` to format the release notes. This command will: |
|
||
// isRelativeLink checks if a given image or link uses a relative path. | ||
func isRelativeLink(link string) bool { | ||
return strings.HasPrefix(link, "../") || strings.HasPrefix(link, "#") |
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.
maybe we should use url.Parse to check if it's absolute URL. Some URLs can start with /
if I'm not mistaken
if link, ok := node.(*ast.Link); ok && entering { | ||
target := string(link.Destination) | ||
if isRelativeLink(target) && strings.HasPrefix(target, "../") { | ||
newDestination := baseMarkdownURL + strings.Replace(target, "../", "", 1) |
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.
should we try ResolveReference
instead?
-![!image](../_images/Max_Connection_Limit.png)`), | ||
expected: []byte(`### PMM 2.42.0 | ||
|
||
Welcome to PMM [v2.42](https://github.com/percona/pmm-doc/tree/main/docs/index.md) |
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.
should it lead to github instead of https://docs.percona.com/percona-monitoring-and-management/3/index.html?
BTW we already migrated from percona/pmm-doc to percona/pmm
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.
yeah, the reason here was that different relative markdown links can link to different links (not just release notes for instance), and it's hard to define the proper link
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.
@idoqo can you provide a few example in existing release notes, please?
@catalinaadam can you help with this, please?
cmd/format-release-notes/main.go
Outdated
"os" | ||
"path/filepath" | ||
|
||
"github.com/alecthomas/kingpin/v2" |
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.
let's use kong since kingpin isn't supported anymore.
"github.com/Kunde21/markdownfmt/v3/markdown" | ||
"github.com/yuin/goldmark" | ||
"github.com/yuin/goldmark/ast" | ||
"github.com/yuin/goldmark/extension" | ||
"github.com/yuin/goldmark/parser" | ||
"github.com/yuin/goldmark/text" |
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.
please format imports
|
|
1 similar comment
|
d82a8fc
to
2dbfcdc
Compare
|
|
|
1 similar comment
|
PMM-13361 and PMM-13077.
Closes #284