Skip to content

CSHARP-4918: Release notes automation #1677

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

Merged
merged 4 commits into from
Apr 29, 2025
Merged

Conversation

sanych-sun
Copy link
Member

No description provided.

@sanych-sun sanych-sun requested a review from a team as a code owner April 24, 2025 20:15
@sanych-sun sanych-sun requested review from JamesKovacs and removed request for a team April 24, 2025 20:15
@sanych-sun sanych-sun added the chore Label to hide PR from generated Release Notes label Apr 24, 2025
@sanych-sun sanych-sun requested review from BorisDog and removed request for JamesKovacs April 24, 2025 20:15
Copy link
Contributor

@BorisDog BorisDog left a comment

Choose a reason for hiding this comment

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

Few questions

- maintenance

- The full list of issues resolved in this release is available at [CSHARP JIRA project](https://jira.mongodb.org/issues/?jql=project%20%3D%20CSHARP%20AND%20fixVersion%20%3D%20${version}%20ORDER%20BY%20key%20ASC).
- Documentation on the .NET driver can be found [here](https://www.mongodb.com/docs/drivers/csharp/v${version}/).
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think docs link work for version that includes patch: "3.3.1".

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

for section in opts.template["sections"]:
if is_in_section(mapped, section):
if mapped in section["items"]:
break # PR was already added to the section
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this happen?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep. If we have multiple PRs for single Jira ticket, then it might be already in the list.


for commit in commits["commits"]:
pullrequests_url = "{github_api_base_url}{repo}/commits/{commit_sha}/pulls".format(
github_api_base_url=opts.github_api_base_url, repo=opts.repo, commit_sha=commit["sha"])
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this mean that we can have multiple PRs for same commit?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure how to make it possible, but github API has such model, so I suppose somehow it's possible.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's probably just same endpoint to server other requests.
So the loop is redundant, do we want to just take the first one and/or throw?
It's minor either way.

PR
@sanych-sun sanych-sun requested a review from BorisDog April 28, 2025 19:04
PR
Copy link
Contributor

@BorisDog BorisDog left a comment

Choose a reason for hiding this comment

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

LGTM! + Few optional comments

url = '{github_api_base_url}{repo}/releases/tags/{tag}'.format(github_api_base_url=opts.github_api_base_url, repo=opts.repo, tag=opts.version_tag)
response = requests.get(url, headers=opts.github_headers)
response.raise_for_status()
if response.status_code == 200:
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe it's safer to have != 404 check?

"Accept": "application/vnd.github+json"
}

print("Prepare release notes for: tag {version_tag}, previous tag {previous_tag}".format(version_tag = options.version_tag, previous_tag = options.previous_tag))
Copy link
Contributor

Choose a reason for hiding this comment

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

Use same tense as other outputs: "Preparing".

PR
@sanych-sun sanych-sun merged commit 9ced8a1 into mongodb:main Apr 29, 2025
3 of 4 checks passed
@sanych-sun sanych-sun deleted the csharp4918 branch April 29, 2025 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Label to hide PR from generated Release Notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants