Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit f3bd70b

Browse files
release template
Signed-off-by: greg pereira <[email protected]>
1 parent 903746b commit f3bd70b

File tree

4 files changed

+209
-0
lines changed

4 files changed

+209
-0
lines changed
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
import yaml
2+
from jinja2 import Template
3+
4+
import requests
5+
import os
6+
7+
GITHUB_TOKEN = os.environ.get("GITHUB_TOKEN")
8+
HEADERS = {
9+
"Authorization": f"Bearer {GITHUB_TOKEN}",
10+
"Accept": "application/vnd.github+json"
11+
}
12+
13+
def get_commit_sha_from_tag(repo, tag):
14+
tag_url = f"https://api.github.com/repos/{repo}/git/ref/tags/{tag}"
15+
tag_data = requests.get(tag_url, headers=HEADERS).json()
16+
if tag_data.get("object", {}).get("type") == "tag":
17+
tag_obj_url = tag_data["object"]["url"]
18+
tag_obj = requests.get(tag_obj_url, headers=HEADERS).json()
19+
return tag_obj["object"]["sha"]
20+
else:
21+
return tag_data["object"]["sha"]
22+
23+
def get_pr_for_commit(repo, sha):
24+
pr_url = f"https://api.github.com/repos/{repo}/commits/{sha}/pulls"
25+
pr_data = requests.get(pr_url, headers={
26+
**HEADERS,
27+
"Accept": "application/vnd.github.groot-preview+json"
28+
}).json()
29+
return pr_data[0] if pr_data else None
30+
31+
def get_ci_checks_for_commit(repo, sha):
32+
checks_url = f"https://api.github.com/repos/{repo}/commits/{sha}/check-runs"
33+
check_data = requests.get(checks_url, headers=HEADERS).json()
34+
return [
35+
{
36+
"name": c["name"],
37+
"url": c["html_url"],
38+
"status": c["conclusion"]
39+
}
40+
for c in check_data.get("check_runs", [])
41+
]
42+
43+
with open("release-llm-d-1.1.0.yaml") as f:
44+
data = yaml.safe_load(f)
45+
46+
for c in data["components"]:
47+
if c.get("old_version") == c.get("version"):
48+
c["has_changes"] = False
49+
continue
50+
51+
c["has_changes"] = True
52+
c["ci_url"] = f"https://github.com/{c['repo']}/actions?query=event:push+tag:{c['version']}"
53+
if c.get("old_version"):
54+
c["changelog_url"] = f"https://github.com/{c['repo']}/compare/{c['old_version']}...{c['version']}"
55+
56+
try:
57+
sha = get_commit_sha_from_tag(c["repo"], c["version"])
58+
pr = get_pr_for_commit(c["repo"], sha)
59+
c["commit_sha"] = sha
60+
c["pr_number"] = pr["number"] if pr else None
61+
c["ci_checks"] = get_ci_checks_for_commit(c["repo"], sha)
62+
except Exception as e:
63+
print(f"⚠️ Failed to get CI info for {c['name']}: {e}")
64+
c["ci_checks"] = []
65+
66+
67+
template = Template("""
68+
# 📦 llm-d {{ project_version }} Release Notes
69+
70+
**Release Date:** {{ release_date }}
71+
**Chart Version:** {{ chart_version }}
72+
73+
---
74+
75+
## 🧩 Component Summary
76+
77+
| Component | Version | Previous Version |
78+
|-----------|---------|------------------|
79+
{% for c in components -%}
80+
| {{ c.name }} | `{{ c.version }}` | `{{ c.old_version or "-" }}` |
81+
{% endfor %}
82+
83+
---
84+
85+
{%- for c in components %}
86+
## 🔹 {{ c.name }}
87+
88+
{%- if c.has_changes %}
89+
- **Changelog**: [{{ c.old_version }} → {{ c.version }}]({{ c.changelog_url }})
90+
{%- else %}
91+
_No version change in this release._
92+
{%- endif %}
93+
94+
- **CI Checks:**
95+
{%- if c.ci_checks %}
96+
{%- for check in c.ci_checks %}
97+
- [{{ check.name }}]({{ check.url }}) [`{{ check.status }}`]
98+
{%- endfor %}
99+
{%- else %}
100+
- _No CI checks found_
101+
{%- endif %}
102+
103+
---
104+
{%- endfor %}
105+
""")
106+
107+
output = template.render(**data)
108+
109+
filename = f"release-{data['project_version']}.md"
110+
111+
with open(filename, "w") as f:
112+
f.write(output)
113+
114+
print(f"✅ Release notes written to {filename}")
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
2+
# 📦 llm-d llm-d-1.1.0 Release Notes
3+
4+
**Release Date:** 2025-07-17
5+
**Chart Version:** 1.1.0
6+
7+
---
8+
9+
## 🧩 Component Summary
10+
11+
| Component | Version | Previous Version |
12+
|-----------|---------|------------------|
13+
| epp | `v0.1.0` | `0.0.3` |
14+
| modelservice | `v0.0.15` | `0.0.10` |
15+
| vllm | `0.0.8` | `0.0.8` |
16+
| routingProxy | `0.0.7` | `0.0.6` |
17+
| inferenceSimulator | `v0.1.2` | `0.0.4` |
18+
19+
---
20+
21+
## 🔹 epp
22+
23+
- **Changelog**: [0.0.3 → v0.1.0](https://github.com/llm-d/llm-d-inference-scheduler/compare/0.0.3...v0.1.0)
24+
- **CI Checks:**
25+
- [docker-build-and-push](https://github.com/llm-d/llm-d-inference-scheduler/actions/runs/15136999662/job/42551051127) [`success`]
26+
- [docker-build-and-push](https://github.com/llm-d/llm-d-inference-scheduler/actions/runs/15136999680/job/42551051066) [`success`]
27+
28+
---
29+
30+
## 🔹 modelservice
31+
32+
- **Changelog**: [0.0.10 → v0.0.15](https://github.com/llm-d/llm-d-model-service/compare/0.0.10...v0.0.15)
33+
- **CI Checks:**
34+
- [docker-build-and-push](https://github.com/llm-d/llm-d-model-service/actions/runs/15305745133/job/43057885324) [`success`]
35+
- [docker-build-and-push](https://github.com/llm-d/llm-d-model-service/actions/runs/15305745152/job/43057885296) [`success`]
36+
37+
---
38+
39+
## 🔹 vllm
40+
41+
_No version change in this release._
42+
43+
- **CI Checks:**
44+
- _No CI checks found_
45+
46+
---
47+
48+
## 🔹 routingProxy
49+
50+
- **Changelog**: [0.0.6 → 0.0.7](https://github.com/llm-d/llm-d-routing-sidecar/compare/0.0.6...0.0.7)
51+
52+
- **CI Checks:**
53+
- [Pipelines as Code CI / llm-d-routing-sidecar](https://github.com/llm-d/llm-d-routing-sidecar/runs/42500129270) [`None`]
54+
55+
---
56+
57+
## 🔹 inferenceSimulator
58+
59+
- **Changelog**: [0.0.4 → v0.1.2](https://github.com/llm-d/llm-d-inference-sim/compare/0.0.4...v0.1.2)
60+
61+
- **CI Checks:**
62+
- [docker-build-and-push](https://github.com/llm-d/llm-d-inference-sim/actions/runs/15584716286/job/43887980202) [`success`]
63+
64+
---
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
project_version: llm-d-1.1.0
2+
chart_version: 1.1.0
3+
release_date: 2025-07-17
4+
components:
5+
- name: epp
6+
version: v0.1.0
7+
old_version: 0.0.3
8+
repo: llm-d/llm-d-inference-scheduler
9+
url: https://github.com/llm-d/llm-d-inference-scheduler
10+
- name: modelservice
11+
version: v0.0.15
12+
old_version: 0.0.10
13+
repo: llm-d/llm-d-model-service
14+
url: https://github.com/llm-d/llm-d-model-service
15+
- name: vllm
16+
version: 0.0.8
17+
old_version: 0.0.8
18+
repo: llm-d/llm-d
19+
url: https://github.com/llm-d/llm-d
20+
- name: routingProxy
21+
version: 0.0.7
22+
old_version: 0.0.6
23+
repo: llm-d/llm-d-routing-sidecar
24+
url: https://github.com/llm-d/llm-d-routing-sidecar
25+
- name: inferenceSimulator
26+
version: v0.1.2
27+
old_version: 0.0.4
28+
repo: llm-d/llm-d-inference-sim
29+
url: https://github.com/llm-d/llm-d-inference-sim

.github/RELEASES/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Jinja2
2+
pyyaml

0 commit comments

Comments
 (0)