Skip to content

v5.43.0

v5.43.0 #1

name: Clean Release Notes
on:
release:
types: [published]
jobs:
clean-release-notes:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Remove ticket prefixes from release notes
uses: actions/github-script@v8
with:
script: |
const release = context.payload.release;
let body = release.body;
if (!body) {
console.log("Release body empty, nothing to clean.");
return;
}
// Remove ticket prefixes like "TPT-1234: " or "TPT-1234:"
body = body.replace(/TPT-\d+:\s*/g, '');
await github.rest.repos.updateRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release.id,
body: body
});
console.log("Release notes cleaned.");