Skip to content

CSHARP-4918: Release notes automation… #1680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sanych-sun
Copy link
Member

No description provided.

@sanych-sun sanych-sun requested a review from a team as a code owner May 2, 2025 00:17
@sanych-sun sanych-sun requested review from adelinowona and removed request for a team May 2, 2025 00:17
@sanych-sun sanych-sun changed the title CSHARP-4918: Release notes automation HARP-4918: Release notes automation. May 2, 2025
@sanych-sun sanych-sun changed the title HARP-4918: Release notes automation. CSHARP-4918: Release notes automation May 2, 2025
@sanych-sun sanych-sun requested review from BorisDog and removed request for adelinowona May 2, 2025 00:18
@BorisDog BorisDog requested a review from Copilot May 2, 2025 18:33
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR automates the generation and publication of release notes while also introducing new CI checks for pull requests.

  • Updated release note processing in evergreen/release-notes.py to handle special characters and improve HTTP error handling.
  • Added a new GitHub Actions workflow (.github/workflows/pr.yml) to validate PR labels, title content, and formatting.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
evergreen/release-notes.py Updated title encoding and HTTP error handling in release notes logic.
.github/workflows/pr.yml Introduced a new workflow to enforce PR label and title requirements.

@@ -91,7 +91,9 @@ def load_pull_requests(opts):
github_api_base_url=opts.github_api_base_url,
repo=opts.repo,
commit_sha=commit["sha"])
pullrequests = requests.get(pullrequests_url, headers=opts.github_headers).json()
pullrequests_response = requests.get(pullrequests_url, headers=opts.github_headers)
pullrequests_response.raise_for_status()
Copy link
Preview

Copilot AI May 2, 2025

Choose a reason for hiding this comment

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

Removing the response.raise_for_status() in publish_release_notes may mask unexpected HTTP errors; consider handling non-404 status codes explicitly to ensure accurate error reporting.

Suggested change
pullrequests_response.raise_for_status()
if pullrequests_response.status_code == 404:
print(f"Warning: Pull request data not found for commit {commit['sha']} (URL: {pullrequests_url})")
continue
elif not pullrequests_response.ok:
raise requests.HTTPError(f"HTTP error {pullrequests_response.status_code} for URL: {pullrequests_url}")

Copilot uses AI. Check for mistakes.

@sanych-sun sanych-sun changed the title CSHARP-4918: Release notes automation CSHARP-4918: Release notes automation. May 2, 2025
@sanych-sun sanych-sun changed the title CSHARP-4918: Release notes automation. CSHARP-4918: Release notes automation… May 2, 2025
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