Skip to content

Commit

Permalink
feat: improve weekly PR update generation script and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
typeid committed Feb 3, 2024
1 parent 741bb2b commit 0c4dc86
Show file tree
Hide file tree
Showing 4 changed files with 169 additions and 101 deletions.
19 changes: 14 additions & 5 deletions docs/release/release-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,16 +337,25 @@ The goal of this task to make the book for the current release available under e
#### Generate weekly PR updates to post in Slack
The goal of this task is to keep the CAPI community updated on recent PRs that have been merged. This is done by using the weekly update tool in `hack/tools/release/weekly/main.go`. Here is how to use it:
1. Checkout the latest commit on the release branch, e.g. `release-1.6`, or the main branch if the release branch doesn't yet exist (e.g. beta release).
2. Build the release weekly update tools binary.
1. Build the release weekly update tools binary.
```bash
make release-weekly-update-tool
```
3. Generate the weekly update with the following command:
2. Generate the weekly update with the following command:
```bash
./bin/weekly --from YYYY-MM-DD --to YYYY-MM-DD --milestone v1.x
./bin/weekly --since YYYY-MM-DD --until YYYY-MM-DD --branch release-1.x
```
3. Paste the output into a new Slack message in the [`#cluster-api`](https://kubernetes.slack.com/archives/C8TSNPY4T) channel. Currently, we post separate messages in a thread for the branch `main` - which corresponds to the active milestone - as well as the two most recent release branches (e.g. `release-1.6` and `release-1.5`).
Example commands to run for the weekly update during ongoing development towards release 1.7:
```bash
# Main branch changes, which correspond to actively worked on release 1.7
./bin/weekly --since 2024-01-22 --until 2024-01-28 --branch main
# Previous 2 release branches
./bin/weekly --since 2024-01-22 --until 2024-01-28 --branch release-1.6
./bin/weekly --since 2024-01-22 --until 2024-01-28 --branch release-1.5
```
4. Paste the output into a new Slack message in the [`#cluster-api`](https://kubernetes.slack.com/archives/C8TSNPY4T) channel. Currently, we post separate messages in a thread for `main` and the two most recent release branches (e.g. `release-1.5` and `release-1.4`).
#### Create PR for release notes
1. Checkout the `main` branch.
Expand Down
4 changes: 2 additions & 2 deletions hack/tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ require (
cloud.google.com/go/storage v1.37.0
github.com/blang/semver/v4 v4.0.0
github.com/google/go-cmp v0.6.0
github.com/google/go-github v17.0.0+incompatible
github.com/onsi/gomega v1.31.1
github.com/pkg/errors v0.9.1
github.com/spf13/pflag v1.0.5
github.com/valyala/fastjson v1.6.4
golang.org/x/oauth2 v0.16.0
google.golang.org/api v0.161.0
k8s.io/api v0.29.1
k8s.io/apiextensions-apiserver v0.29.1
Expand Down Expand Up @@ -102,7 +104,6 @@ require (
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
Expand All @@ -120,7 +121,6 @@ require (
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/oauth2 v0.16.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.16.0 // indirect
Expand Down
3 changes: 2 additions & 1 deletion hack/tools/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY=
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
github.com/google/go-github/v53 v53.2.0 h1:wvz3FyF53v4BK+AsnvCmeNhf8AkTaeh2SoYu/XUvTtI=
github.com/google/go-github/v53 v53.2.0/go.mod h1:XhFRObz+m/l+UCm9b7KSIC3lT3NWSXGt7mOsAWEloao=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
Expand Down Expand Up @@ -377,7 +379,6 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
Expand Down
Loading

0 comments on commit 0c4dc86

Please sign in to comment.