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

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 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

if [[ "$version" == *.0 ]]; then
template_file="./release-notes.yml"
else
template_file="./patch-notes.yml"
Copy link
Contributor

Choose a reason for hiding this comment

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

minor: identation

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.

labels: "*"

- 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.

- 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.

total_pages = 1
page_size = 100
commits_url = "{github_api_base_url}{repo}/compare/{previous_tag}...{version_tag}".format(
github_api_base_url=opts.github_api_base_url, repo=opts.repo, previous_tag=opts.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.

minor: single line to line for each param?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

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.

@sanych-sun sanych-sun requested a review from BorisDog April 28, 2025 19:04
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.

2 participants