Skip to content

feat: add a way to pass release notes from the PR #16904

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

machine424
Copy link
Member

@machine424 machine424 commented Jul 22, 2025

make the release note block part of .github/PULL_REQUEST_TEMPLATE.md (inspired by k8s')

A CI check would check the input.


Using the PR description makes it easy for the reviewers to contribute.
Also, IMHO, it's simpler than having to run commands or add files to have it as part of the git.

We can discuss the changelog generation part later, but this should help streamline the shephard's workflow and improve their overall experience.

Does this PR introduce a user-facing change?

NONE

@machine424 machine424 force-pushed the ensure-release-entry branch from 60c4fa6 to 8275955 Compare July 22, 2025 07:53
make the release note block part of .github/PULL_REQUEST_TEMPLATE.md (inspired from k8s')

A CI check would check the input.

Signed-off-by: machine424 <[email protected]>
@machine424 machine424 force-pushed the ensure-release-entry branch from 8275955 to 5a2a94a Compare July 22, 2025 07:54
contents: read
pull-requests: read

jobs:
Copy link
Member Author

Choose a reason for hiding this comment

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

make is required.

Signed-off-by: machine424 <[email protected]>
@beorn7
Copy link
Member

beorn7 commented Jul 29, 2025

What's the idea of how to read back this information (and from where)? Will there be more tooling? In some modes (merge commit), the PR description makes it into the git log, but in others (squash?), it might not happen. I guess K8s has experience with that.

@machine424
Copy link
Member Author

machine424 commented Jul 29, 2025

What's the idea of how to read back this information (and from where)? Will there be more tooling? In some modes (merge commit), the PR description makes it into the git log, but in others (squash?), it might not happen. I guess K8s has experience with that.

I previously attempted to implement an all-in-one pipeline here: #15191.
But, now, my goal is to only get authors and reviewers into the habit of providing release note entries as part of the PR, since no one is better positioned than them to write meaningful notes. I think PR descriptions provide the easier channel for that: no need to run local commands, no git conflicts, easily accessible, and no special permissions or git access required to make edits

That doesn't prevent the release shepherd from adjusting them later, or the changelog reviewers from doing the same.

The release shepherd will still manually collect commits between two refs and build the release notes, as we do today.

For the release notes generation, we can later discuss whether we want a custom script like the one in #15191, or whether we should adapt and reuse an existing tool, like Kubernetes’ https://github.com/kubernetes/release/tree/master/cmd/release-notes (they also include release notes in PR descriptions).

Or, if needed, we can move to another mechanism entirely, but I'd like to start trying things out.

@beorn7
Copy link
Member

beorn7 commented Jul 31, 2025

Makes sense to me. Still, I would like this to get approved by someone more familiar with the CI checks and the Makefile. @SuperQ maybe?

Copy link
Contributor

@jan--f jan--f left a comment

Choose a reason for hiding this comment

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

Very nice, I like it!
In a follow-up PR we could also check that the CHANGELOG entry references the correct PR number.

@@ -0,0 +1,30 @@
#!/bin/bash
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
#!/bin/bash
#!/usr/bin/env bash

Copy link
Member Author

Choose a reason for hiding this comment

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

(not sure if we can easily have a linter for such things, as both are used https://github.com/search?q=repo%3Aprometheus%2Fprometheus%20%22%23!%2Fbin%2Fbash%22&type=code)

@@ -0,0 +1,30 @@
#!/bin/bash

set -e
Copy link
Member

Choose a reason for hiding this comment

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

I recommend against set -e since bash does silent exits on errors. This makes it hard to debug.

Suggested change
set -e
set -u -o pipefail

Then make sure we have good error checking within the script.

Copy link
Member Author

Choose a reason for hiding this comment

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

I usually go for "fail fast" in case the script doesn't have good error checking, it's safer.
But I can change here as I assume the needed checks are there.
(also, nothing enforces this apparently https://github.com/search?q=repo%3Aprometheus%2Fprometheus+%22set+-e%22&type=code)

Signed-off-by: machine424 <[email protected]>
@machine424 machine424 requested a review from SuperQ August 1, 2025 15:04
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.

4 participants