Skip to content

Add template for prereleases #9165

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 8 commits into from
Oct 22, 2021
Merged

Conversation

king-alexander
Copy link
Contributor

@king-alexander king-alexander commented Oct 5, 2021

Close #8820

@nicoddemus
Copy link
Member

Hi @king-alexander,

From #8820 I take we also need to update pytest/scripts/release.py?

@king-alexander
Copy link
Contributor Author

Hey @nicoddemus! I appreciate your comment. I'm new to open source and using Hacktoberfest as an opportunity to get more involved. Yes, pytest/scripts/release.py needs to be updated. I wasn’t quite sure how to go about it and planned to take another look tomorrow morning.

@nicoddemus
Copy link
Member

No worries, take your time, and let us know if you have any questions!

@king-alexander
Copy link
Contributor Author

Hey @nicoddemus thanks! I do have a question. Under what condition should the prerelease template be used versus the minor release template or patch template? @The-Compiler mentions passing the is_major option to release.py, but don't we need another condition to pick between 3 different templates?

@nicoddemus
Copy link
Member

Under what condition should the prerelease template be used versus the minor release template or patch template?

At the moment announce just receives a version parameter:

def announce(version):

And based on that, decides which template to use:

template_name = (
"release.minor.rst" if version.endswith(".0") else "release.patch.rst"
)

I suggest we explicitly pass the name of template, so announce receives another parameter template_name, which we explicitly pass on from prepare-release.py:

cmdline = ["tox", "-e", "release", "--", version, "--skip-check-links"]

@king-alexander king-alexander marked this pull request as ready for review October 8, 2021 13:59
@king-alexander
Copy link
Contributor Author

@nicoddemus Let me know what you think!

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Thanks @king-alexander for the updates, left a few more comments, please take a look!

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Thanks @king-alexander!

@king-alexander
Copy link
Contributor Author

Thank you @nicoddemus! I'm grateful for the chance to contribute 🙂

@king-alexander
Copy link
Contributor Author

@nicoddemus Is this good to merge?

@nicoddemus
Copy link
Member

Yes, thanks for the ping! Merging.

@nicoddemus nicoddemus changed the title #8820: Add template for prereleases Add template for prereleases Oct 22, 2021
@nicoddemus nicoddemus merged commit 005690b into pytest-dev:main Oct 22, 2021
@The-Compiler
Copy link
Member

Just catching up on pytest 7.0.0 in the last couple of days - thanks @king-alexander and @nicoddemus, great work! 👍

@king-alexander king-alexander deleted the 8820 branch November 12, 2021 14:14
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.

Fix release announcement script for prereleases
3 participants