Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/actions/update_changelog/update_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ def update_changelog(changelog_path, pr_data):
if validate_pr_description(pr["body"], is_not_for_cl_valid=False):
category = extract_changelog_category(pr["body"])
category = match_pr_to_changelog_category(category)
body = extract_changelog_body(pr["body"])
dirty_body = extract_changelog_body(pr["body"])
body = dirty_body.replace("\r", "")
if category and body:
body += f" [#{pr['number']}]({pr['url']})"
body += f" ([{pr['name']}]({pr['user_url']}))"
Expand Down Expand Up @@ -190,12 +191,13 @@ def fetch_user_details(username):
try:
pr_details = fetch_pr_details(pr["id"])
user_details = fetch_user_details(pr_details["user"]["login"])
name = user_details.get("name", None)
if validate_pr_description(pr_details["body"], is_not_for_cl_valid=False):
pr_data.append({
"number": pr_details["number"],
"body": pr_details["body"].strip(),
"url": pr_details["html_url"],
"name": user_details.get("name", pr_details["user"]["login"]), # Use login if name is not available
"name": name or pr_details["user"]["login"], # Use login if name is not available
"user_url": pr_details["user"]["html_url"]
})
except Exception as e:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/validate_pr_description.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
ref: main

- name: Use custom PR validation action
id: validate
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## Unreleased