Skip to content
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

Add --gh and --section flags to "blurb add" #15

Closed
wants to merge 2 commits into from

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Jun 25, 2024

Fixes #6.

Updated version of python/core-workflow#312 but with --gh instead of --bpo.

Examples

Success cases

blurb add opens the usual empty template

#
# Please enter the relevant GitHub issue number here:
#
.. gh-issue: 

#
# Uncomment one of these "section:" lines to specify which section
# this entry should go in in Misc/NEWS.d.
#
#.. section: Security
#.. section: Core and Builtins
#.. section: Library
#.. section: Documentation
#.. section: Tests
#.. section: Build
#.. section: Windows
#.. section: macOS
#.. section: IDLE
#.. section: Tools/Demos
#.. section: C API


# Write your Misc/NEWS.d entry below.  It should be a simple ReST paragraph.
# Don't start with "- Issue #<n>: " or "- gh-issue-<n>: " or that sort of stuff.
###########################################################################


blurb add --gh 123456 opens the template with gh-issue filled in

#
# Please enter the relevant GitHub issue number here:
#
.. gh-issue: 123456

#
# Uncomment one of these "section:" lines to specify which section
# this entry should go in in Misc/NEWS.d.
#
#.. section: Security
#.. section: Core and Builtins
#.. section: Library
#.. section: Documentation
#.. section: Tests
#.. section: Build
#.. section: Windows
#.. section: macOS
#.. section: IDLE
#.. section: Tools/Demos
#.. section: C API


# Write your Misc/NEWS.d entry below.  It should be a simple ReST paragraph.
# Don't start with "- Issue #<n>: " or "- gh-issue-<n>: " or that sort of stuff.
###########################################################################


blurb add --section Security adds an uncommented section

#
# Please enter the relevant GitHub issue number here:
#
.. gh-issue: 

#
# Uncomment one of these "section:" lines to specify which section
# this entry should go in in Misc/NEWS.d.
#
#.. section: Security
#.. section: Core and Builtins
#.. section: Library
#.. section: Documentation
#.. section: Tests
#.. section: Build
#.. section: Windows
#.. section: macOS
#.. section: IDLE
#.. section: Tools/Demos
#.. section: C API
.. section: Security


# Write your Misc/NEWS.d entry below.  It should be a simple ReST paragraph.
# Don't start with "- Issue #<n>: " or "- gh-issue-<n>: " or that sort of stuff.
###########################################################################


blurb add --gh 123456 --section Security adds both

#
# Please enter the relevant GitHub issue number here:
#
.. gh-issue: 123456

#
# Uncomment one of these "section:" lines to specify which section
# this entry should go in in Misc/NEWS.d.
#
#.. section: Security
#.. section: Core and Builtins
#.. section: Library
#.. section: Documentation
#.. section: Tests
#.. section: Build
#.. section: Windows
#.. section: macOS
#.. section: IDLE
#.. section: Tools/Demos
#.. section: C API
.. section: Security


# Write your Misc/NEWS.d entry below.  It should be a simple ReST paragraph.
# Don't start with "- Issue #<n>: " or "- gh-issue-<n>: " or that sort of stuff.
###########################################################################


Error cases

blurb add --gh Security
Error: blurb add --gh argument Security is not a valid integer!blurb add --section 123456
Error: blurb add --section argument '123456' is not a valid section!  Use one of:
Security
Core and Builtins
Library
Documentation
Tests
Build
Windows
macOS
IDLE
Tools/Demos
C APIblurb add --gh Security --section 123456
Error: blurb add --gh argument Security is not a valid integer!

@hugovk hugovk added the enhancement New feature or request label Jun 25, 2024
@hugovk
Copy link
Member Author

hugovk commented Jun 25, 2024

pyfakefs doesn't yet support Python 3.13 (pytest-dev/pyfakefs#1017), let's temporarily remove it from the CI.

@picnixz
Copy link

picnixz commented Jun 25, 2024

Aaaah I was writing it as well! I have an alternative where you can add something like blurb add -i 12345 -s 2 instead of writing the section name. But I did not have your alternative with --gh and --section.

@hugovk I have an alternative with tests and a bit more checks, could I also post it?

@hugovk
Copy link
Member Author

hugovk commented Jun 25, 2024

@picnixz Yes, please do :)

@hugovk
Copy link
Member Author

hugovk commented Jul 22, 2024

Closing in favour of #16.

@hugovk hugovk closed this Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add --gh and --section flags to "blurb add"
2 participants