Skip to content
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

Merged
merged 7 commits into from
Mar 12, 2021
Merged

Add changelog process #1790

merged 7 commits into from
Mar 12, 2021

Conversation

yondonfu
Copy link
Member

@yondonfu yondonfu commented Mar 11, 2021

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:

  • README and other documentation updated
  • Node runs in OSX and devenv
  • All tests in ./test.sh pass

@yondonfu yondonfu marked this pull request as ready for review March 11, 2021 22:42
@@ -0,0 +1,14 @@
import fileinput
Copy link
Contributor

@kyriediculous kyriediculous Mar 12, 2021

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)

Copy link
Member Author

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.

Copy link
Contributor

@kyriediculous kyriediculous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after squashing 👍

Darwin build fix and GH action based Linux build and test
@yondonfu yondonfu merged commit 558e4d6 into master Mar 12, 2021
@yondonfu yondonfu deleted the yf/changelog branch March 12, 2021 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants