-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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() |
There was a problem hiding this comment.
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.
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.
No description provided.