Skip to content

Commit fc4ee2f

Browse files
committed
feat: Add task to generate AI release notes
Added a new Tekton task, `ai-release-notes`, to the release pipeline. This task is responsible for generating release notes using an AI model. The task utilizes a new Python script, `hack/generate-releasenotes.py`, to: - Fetch commit data between the current and previous release tags. - Map commits to their corresponding pull requests. - Extract JIRA ticket identifiers from commit messages and PR bodies. - Send this information to a Gemini model for categorization and summarization. - Format the AI-generated notes along with static header, installation, and changelog sections. This enhances the release process by automating the creation of detailed and informative release notes. Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
1 parent 106b201 commit fc4ee2f

File tree

2 files changed

+538
-0
lines changed

2 files changed

+538
-0
lines changed

.tekton/release-pipeline.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,39 @@ spec:
130130
workspaces:
131131
- name: source
132132
workspace: source
133+
- name: ai-release-notes
134+
runAfter:
135+
- gorelease
136+
workspaces:
137+
- name: source
138+
workspace: source
139+
taskSpec:
140+
workspaces:
141+
- name: source
142+
steps:
143+
- name: generate-release-notes
144+
image: registry.access.redhat.com/ubi9/python-312
145+
workingDir: $(workspaces.source.path)
146+
env:
147+
- name: HUB_TOKEN
148+
valueFrom:
149+
secretKeyRef:
150+
name: "nightly-ci-github-hub-token"
151+
key: "hub-token"
152+
- name: GEMINI_API_KEY
153+
valueFrom:
154+
secretKeyRef:
155+
name: "gemini-api-key"
156+
key: "api-key"
157+
- name: REPO_OWNER
158+
value: "{{ repo_owner }}"
159+
- name: REPO_NAME
160+
value: "{{ repo_name }}"
161+
script: |
162+
#!/usr/bin/env bash
163+
set -euxo pipefail
164+
git config --global --add safe.directory $(workspaces.source.path)
165+
python3 ./hack/generate-releasenotes.py
133166
workspaces:
134167
- name: source
135168
volumeClaimTemplate:

0 commit comments

Comments
 (0)