Skip to content

Commit

Permalink
Support GitHub Issues (#431)
Browse files Browse the repository at this point in the history
* Support GitHub Issues

Use `issue` instead of `bpo` in the metadata.
Use `gh-<number>` in the misc/news filename

Bump the version to 1.1.0

Closes #428

* Test against Python 3.10

* Clarify that b.p.o means bugs.python.org on the changelog

Co-authored-by: Oleg Iarygin <dralife@yandex.ru>

* Support bpo as well because the `blurb merge` command still
need to be able to read the existing `bpo-` news files.

If the metadata contains `bpo-`, then append `bpo-` to the filename.
Else, append `gh-issue`.

* Update readme to use `gh-issue` instead of `gh-`

* Use `gh-issue` when both `bpo` and `gh-issue` exist.

Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
  • Loading branch information
Mariatta and arhadthedev committed Apr 7, 2022
1 parent 90f9ca1 commit 6008a9b
Show file tree
Hide file tree
Showing 13 changed files with 127 additions and 72 deletions.
24 changes: 15 additions & 9 deletions blurb/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Under ``Misc/NEWS.d`` you'll find the following:
the various ``Misc/NEWS`` categories. Inside these subdirectories
are more ``.rst`` files with long, uninteresting, computer-generated
names. Example:
``Misc/NEWS.d/next/Library/2017-05-04-12-24-06.bpo-25458.Yl4gI2.rst``
``Misc/NEWS.d/next/Library/2017-05-04-12-24-06.gh-issue-25458.Yl4gI2.rst``


blurb subcommands
Expand Down Expand Up @@ -85,9 +85,9 @@ in the correct place, and stages it in ``git`` for you.
The template for the ``blurb add`` message looks like this::

#
# Please enter the relevant bugs.python.org issue number here:
# Please enter the relevant GitHub issue number here:
#
.. bpo:
.. gh-issue:

#
# Uncomment one of these "section:" lines to specify which section
Expand All @@ -106,13 +106,13 @@ The template for the ``blurb add`` message looks like this::
#.. section: C API

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

Here's how you interact with the file:

* Add the ``bugs.python.org`` issue number for this checkin to the
end of the ``.. bpo:`` line.
* Add the GitHub issue number for this checkin to the
end of the ``.. gh-issue:`` line.

* Uncomment the line with the relevant ``Misc/NEWS`` section for this entry.
For example, if this should go in the ``Library`` section, uncomment
Expand All @@ -126,11 +126,11 @@ Here's how you interact with the file:
When ``blurb add`` gets a valid entry, it writes it to a file
with the following format::

Misc/NEWS.d/next/<section>/<datetime>.bpo-<bpo>.<nonce>.rst
Misc/NEWS.d/next/<section>/<datetime>.gh-issue-<issue_number>.<nonce>.rst

For example, a file added by ``blurb add`` might look like this::

Misc/NEWS.d/next/Library/2017-05-04-12-24-06.bpo-25458.Yl4gI2.rst
Misc/NEWS.d/next/Library/2017-05-04-12-24-06.gh-issue-25458.Yl4gI2.rst

``<section>`` is the section provided in the checkin message.

Expand Down Expand Up @@ -172,7 +172,7 @@ for the "sections" inside each release, whereas ``blurb merge``
has a hard-coded preferred ordering for the sections. Also,
**blurb** aggressively reflows paragraphs to < 78 columns,
wheras the original hand-edited file occasionally had lines
> 80 columns. Finally, **blurb** strictly uses ``bpo-<n>:`` to
> 80 columns. Finally, **blurb** strictly uses ``gh-issue-<n>:`` to
specify issue numbers at the beginnings of entries, wheras
the legacy approach to ``Misc/NEWS`` required using ``Issue #<n>:``.

Expand Down Expand Up @@ -247,6 +247,12 @@ part of the cherry-picking process.
Changelog
---------

1.1.0
~~~~~

- Support GitHub Issues in addition to b.p.o (bugs.python.org).
If "gh-issue" is in the metadata, then the filename will contain "gh-issue-<number>" instead of "bpo-".

1.0.7
~~~~~

Expand Down
Loading

0 comments on commit 6008a9b

Please sign in to comment.