open-telemetry / opentelemetry-go

OpenTelemetry Go API and SDK
https://opentelemetry.io/
Apache License 2.0
4.99k stars 1.01k forks source link

Protect released changelog in CI #5560

Open XSAM opened 4 days ago

XSAM commented 4 days ago

resolve #1682

This PR adds a new action in CI to protect released sections in the changelog from being changed. It compares the released sections in the changelog from the base branch to the current PR. It fails if a change happens.

Apply "Unlock Released Changelog" to bypass this check when doing a new release.

Action result if we changed the unreleased section: https://github.com/open-telemetry/opentelemetry-go/pull/5560/commits/d640deb435cb54802c6819140ee467ad67b068df Action result if we changed the released section: https://github.com/open-telemetry/opentelemetry-go/pull/5560/commits/d672de7a54d97979b4ec83f864f2c1789f6b292a


Meaning of awk '/^\<!-- Released section --\>/ {flag=1} /^\<!-- Released section ended --\>/ {flag=0} flag'

dmathieu commented 1 day ago

This is a great idea!