-
Notifications
You must be signed in to change notification settings - Fork 178
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
Add changelog process #1790
Add changelog process #1790
Conversation
linkify_changelog.py
Outdated
@@ -0,0 +1,14 @@ | |||
import fileinput |
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.
II don't really like randomly throwing python into this repo, now it is a dependency required for contributing to this repo while it's a go repo. I don't think that's great developer experience.
Seems trivial to rewrite this in go copy-pasting the regex.
Can write the results back to file as well of course rather than printing them.
package main
import (
"bufio"
"fmt"
"log"
"os"
"regexp"
)
func main() {
file, err := os.Open("./changelog.md")
if err != nil {
log.Fatal(err)
}
defer file.Close()
m := regexp.MustCompile(`#([0-9]*)`)
scanner := bufio.NewScanner(file)
for scanner.Scan() {
line := m.ReplaceAllString(scanner.Text(), `[#$1](https://github.com/livepeer/go-livepeer/pull/$1)`)
fmt.Println(line)
}
if err := scanner.Err(); err != nil {
log.Fatal(err)
}
}
Input
#1 hello world (@kyriediculous)
#2 hello mars (@yondonfu)
Output
$ go run changelog-link.go
[#1](https://github.com/livepeer/go-livepeer/pull/1) hello world (@kyriediculous)
[#2](https://github.com/livepeer/go-livepeer/pull/2) hello mars (@yondonfu)
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.
Good call on sticking with Go for this script to limit the number of language dependencies for the repo. Converted the script to Go in 876d96f and updated the linkify command in doc/releases.md
5d41439.
now it is a dependency required for contributing to this repo while it's a go repo. I don't think that's great developer experience.
Just to add a bit of clarification to this point - most contributors wouldn't be expected to have to run this script and the only person that would be expected to run this script (once when a release is being created) is the release coordinator.
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 after squashing 👍
Used to keep track of changes to release.
Darwin build fix and GH action based Linux build and test
What does this pull request do? Explain your changes. (required)
Introduce a changelog process described in
doc/contributing.md
. The motivation behind adding this changelog process is to make it easier to add the list of changes to release notes whenever we cut a release - if we update the changelog for each PR then it'll already be ready come release time and that makes it easier for the release coordinator!Most of this process is based off of the process used in tendermint with a few simplifications to make the transition to this process a bit easier (i.e. a few less rules).
Specific updates (required)
See commit history.
How did you test each of these updates (required)
N/A
Does this pull request close any open issues?
N/A
Checklist:
./test.sh
pass