ossf / scorecard

OpenSSF Scorecard - Security health metrics for Open Source
https://scorecard.dev
Apache License 2.0
4.41k stars 485 forks source link

Feature: automated semver releases #982

Open azeemshaikh38 opened 3 years ago

azeemshaikh38 commented 3 years ago

We use a webhook to create stable docker images when a release test run successfully completes. Similarly we should have a webhook, such that when prod cron job completes successfully, we use semver specification to automatically create a new tag and release. On a high-level this is what the webhook needs to do:

https://github.com/go-git/go-git might come in handy for doing the Git operation in Golang.

laurentsimon commented 2 years ago

how do we handle automated release notes?

azeemshaikh38 commented 2 years ago

There was a discussion about automated release note generation, can't seem to find the issue/thread for it. Gist was that Kubernetes does something like this already, so we could do it too. @naveensrinivasan may know more about this.

But, to your point, yes we should also consider adding support for automated release note generation also. Let's create a separate issue for automated release note generation? Scope of the issue can be:

laurentsimon commented 2 years ago

My main concern/question is how we automate release notes that are human-consumable. A list of merged PRs is not very eligible for human. Unless we think it's overkill for minor releases. wdut?

azeemshaikh38 commented 2 years ago

Sorry it was not Kubernetes, but sigstore/cosign - https://github.com/sigstore/cosign/releases, released by sigstore-bot. Like you said, the release notes should be human readable not just changelog. And it is possible to automate it that way.

github-actions[bot] commented 2 years ago

Stale issue message

justaugustus commented 2 years ago

There was a discussion about automated release note generation, can't seem to find the issue/thread for it. Gist was that Kubernetes does something like this already, so we could do it too. @naveensrinivasan may know more about this.

My team manages this tool: https://github.com/kubernetes/release/tree/master/cmd/release-notes Here are some examples of output from the tool:

While I haven't personally used it, the tool also supports supplying your own go template to enable further formatting.

One thing to note is that it expects a code-fenced block in the PR description (with release-note as the code type):

A really great human-readable release note

The idea here being that while we can't always expect the commit history to be perfect (maybe lacking convention or from a new contributor with multiple commits that need squashing), as maintainers we have access to edit the PR descriptions to ensure the release-note is does a reasonable job describing the change.

Some examples: https://github.com/kubernetes/release/pull/2370, https://github.com/kubernetes/release/pull/2330, https://github.com/kubernetes/release/pull/2326

Similar to how PR titles are validated here, in several Kubernetes repos we automatically block PRs without either:

justaugustus commented 2 years ago

As for releasing:

azeemshaikh38 commented 2 years ago

@justaugustus would the work that you are doing on #1677 make it feasible to generate automated release notes?