Skip to content

feat(release): credit contributors automatically in the release notes - #432

Merged
devops-thiago merged 1 commit into
release/v0.5.0from
feat/release-contributor-credit
Jul 27, 2026
Merged

feat(release): credit contributors automatically in the release notes#432
devops-thiago merged 1 commit into
release/v0.5.0from
feat/release-contributor-credit

Conversation

@devops-thiago

@devops-thiago devops-thiago commented Jul 27, 2026

Copy link
Copy Markdown
Owner

What type of PR is this?

  • 🏗️ CI/CD

Description

Release notes were assembled from CHANGELOG.md alone, so GitHub's generated New Contributors
section never ran and outside contributors went uncredited.

v0.5.0 has one: @matheusandre1 wrote the wider default ignored-files patterns (#429).

Workflow

gh release create gains the generated section — but not via --generate-notes. The existing
workflow has two paths, and gh release edit (the re-run path) has no --generate-notes flag,
so adding it only to create would mean any re-run silently overwrites the body and drops the
credit. Instead the notes are generated once through the Release Notes API and both paths publish
the same release_body.md:

cp release_notes.md release_body.md
if generated=$(gh api "repos/${GITHUB_REPOSITORY}/releases/generate-notes" \
    -f tag_name="$TAG" --jq .body 2>/dev/null) && [ -n "$generated" ]; then
  printf '\n\n%s\n' "$generated" >> release_body.md
else
  echo "::warning::Could not generate release notes; publishing CHANGELOG notes only"
fi

Best-effort by design: if generation fails the release still publishes with the curated notes and a
warning, rather than failing at the last step of a release.

contents: write and GH_TOKEN are already present on that step, so no permission change.

.github/release.yml (new)

Shapes the generated section. Excludes dependabot and github-actions: seven Dependabot PRs
landed in v0.5.0 and would bury the humans in both the PR list and the contributor credit, and the
bumps are already summarised under Dependencies in the changelog.

Related Issues

N/A — release process.

How Has This Been Tested?

  • Manual testing

  • .github/release.yml parses and carries the changelog root key GitHub expects

  • Confirmed gh release edit lacks --generate-notes (gh release edit --help), which is what
    drove the generate-once approach rather than the one-flag version

  • Confirmed the step already exports GH_TOKEN and the job holds contents: write, both required
    by the generate-notes endpoint

  • Contributors verified from the branch itself: git shortlog -sne origin/main..origin/release/v0.5.0
    → Thiago Gonzaga (28), dependabot (7), Matheus André (1, feat(review): enhance ignored files configuration and add tests for default patterns #429)

The generated section itself can only be verified when a release is cut — the failure mode if
anything is wrong is a warning plus notes-as-before, not a broken release.

Checklist

  • My code follows the project's coding standards
  • I have performed a self-review of my own code

@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@thrillhousebot

Copy link
Copy Markdown

🤖 ThrillhouseBot PR Summary

What this PR does

The PR modifies the release workflow to use the GitHub Releases API to generate additional release notes (including new contributor credit) and appends them to the curated changelog notes, while keeping the release process robust. It also adds a release.yml configuration to shape the generated section and includes a manual contributor entry in CHANGELOG.md.

Control-Flow Diagram

🔀 Show diagram
flowchart TD
  A["Copy release_notes.md to release_body.md"] --> B["Call generate-notes API"]
  B --> C{"generation succeeded\nand generated != empty?"}
  C -- yes --> D["Append generated notes to release_body.md"]
  C -- no --> E["Emit warning (notes only)"]
  D --> F{"Release TAG exists?"}
  E --> F
  F -- yes --> G["gh release upload artifacts\nand gh release edit with --notes-file release_body.md"]
  F -- no --> H["gh release create with --notes-file release_body.md"]
Loading

Changes Overview

  • Files changed: 3
  • Lines added: +43
  • Lines removed: -2

Changed Files

File Change Summary
.github/release.yml Added Added config to exclude bot authors and categorize generated release notes
.github/workflows/release.yml Modified Prepends curated notes and appends generated section to a combined release_body.md, used by both create and edit paths
CHANGELOG.md Modified Added Contributors section for v0.5.0 with credit to @matheusandre1

Risk Assessment

Risk Count
🔴 Critical 0
🟠 High 0
🟡 Medium 0
🔵 Low 0

No new issues found in this PR, but the review cannot be approved until CI is confirmed green.

⚠️ CI Checks Status

Some checks are still pending or have failed:

Check Type Status Detail
frontend check-run ⏳ Pending -
changes check-run ⏳ Pending -
trivy check-run ⏳ Pending -
format check-run ⏳ Pending -
actionlint check-run ⏳ Pending -
test check-run ⏳ Pending -
dependency-review check-run ⏳ Pending -

Automated review by ThrillhouseBot. Reply with /review to re-run.

@thrillhousebot thrillhousebot Bot added enhancement New feature or request github_actions Pull requests that update GitHub Actions code labels Jul 27, 2026
Release notes were built from CHANGELOG.md alone, so GitHub's generated
"New Contributors" section never ran — no release from v0.3.0 onward has one.
v0.5.0 would have shipped the same way, without crediting @matheusandre1 for
the wider ignored-files defaults (#429).

The workflow now asks the Release Notes API for the generated section and
appends it after the curated notes. Generated explicitly rather than via
`gh release create --generate-notes` because `gh release edit` has no
equivalent flag — the existing re-run path would have overwritten the body and
dropped the credit. Best-effort: a failed generation warns and publishes the
CHANGELOG notes alone rather than failing the release.

.github/release.yml shapes that section and excludes Dependabot and
github-actions, since seven bot PRs in one release would bury the humans in
both the PR list and the contributor credit; the bumps are already summarised
under Dependencies.

No changelog maintenance: crediting stays automatic on every future release.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@devops-thiago
devops-thiago force-pushed the feat/release-contributor-credit branch from b65b2c4 to d2cb2e4 Compare July 27, 2026 01:57
@devops-thiago devops-thiago changed the title feat(release): credit contributors in the release notes and changelog feat(release): credit contributors automatically in the release notes Jul 27, 2026

@thrillhousebot thrillhousebot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Everything's coming up Thrillhouse! 🎉

No issues found in this PR.

@thrillhousebot thrillhousebot Bot added the documentation Improvements or additions to documentation label Jul 27, 2026
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sonarqubecloud

Copy link
Copy Markdown

@devops-thiago
devops-thiago merged commit 81c3795 into release/v0.5.0 Jul 27, 2026
14 checks passed
@devops-thiago
devops-thiago deleted the feat/release-contributor-credit branch July 27, 2026 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant