Skip to content

Automates CHANGELOG.md generation and draft release note management using Gemini AI, triggered on every GitHub Release event.#452

Open
vibhutikumar07 wants to merge 3 commits intodevelopfrom
feat/ai-changelog
Open

Automates CHANGELOG.md generation and draft release note management using Gemini AI, triggered on every GitHub Release event.#452
vibhutikumar07 wants to merge 3 commits intodevelopfrom
feat/ai-changelog

Conversation

@vibhutikumar07
Copy link
Collaborator

Describe your changes

How It Works:
On every release (released), the changelog.yml workflow runs
generate-changelog.js resolves the previous tag (e.g. 1.7.0 → 1.8.0), fetches all merged PRs and commits in that range
Gemini Flash writes a structured ## Version X.Y.Z / ### Added / ### Fixed / ### Changed entry using full project context (CAP SDM, CMIS, tenant handling, etc.)
If GEMINI_API_KEY is unavailable, a structured fallback groups PRs by their GitHub labels
The entry is prepended to CHANGELOG.md and pushed back to develop via git pull --rebase + git push
In parallel, release-drafter keeps a draft release auto-updated as PRs land on develop

Any documentation

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist before requesting a review

  • I follow Java Development Guidelines for SAP
  • I have tested the functionality on my cloud environment.
  • I have provided sufficient automated/ unit tests for the code.
  • I have increased or maintained the test coverage.
  • I have ran integration tests on my cloud environment.
  • I have validated blackduck portal for any vulnerability after my commit.

Upload Screenshots/lists of the scenarios tested

  • I have Uploaded Screenshots or added lists of the scenarios tested in description

Adds fully automated CHANGELOG.md generation on every GitHub Release event,
plus a Release Drafter for keeping the GitHub Release body up-to-date as PRs
are merged to develop.

New files:
- .github/scripts/generate-changelog.js
    Gemini-powered script that finds PRs and commits since the last tag,
    calls Gemini Flash to write a structured changelog entry matching the
    project's existing ## Version / ### Added / ### Fixed format, and
    prepends it to CHANGELOG.md. Includes a structured fallback (from PR
    labels) in case the Gemini API is unavailable.

- .github/workflows/changelog.yml
    Triggers on both prereleased and released GitHub Release events.
    Checks out develop, runs the Gemini script, then commits and pushes
    the updated CHANGELOG.md with git pull --rebase to avoid conflicts
    with the concurrent newrelease version-bump commit.

- .github/release-drafter.yml
    Configuration for release-drafter: categorizes PRs by label into
    Breaking Changes, New Features, Bug Fixes, Security, Performance,
    Documentation, Dependency Updates. Generates next semver automatically
    and populates the GitHub Release body draft.

- .github/workflows/release-drafter.yml
    Triggers on push to develop and on PR events to keep the draft
    release body current as work lands.
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.

1 participant