Skip to content

Conversation

@matrixise
Copy link
Member

@matrixisematrixise commented Feb 15, 2019

Update of the pull request of @tiran

Co-authored-by: Christian Heimes christian@python.org

tiranand others added 2 commits February 15, 2019 13:11
blurb now gets the branch name from git and auto-fills the bpo number if the branch name looks like "bpo-1234-whatever". "bpo1234" or "bpo_1234_whatever" are also supported. Further more blurb now writes .git/blurb commit template. The first line of the template is "bpo-{bpo}: suffix of branch name". The body of the template is the blurb text. $ git config commit.template .git/blurb $ git checkout -b bpo-1234-confuse-a-cat $ blurb git ci --- bpo-1234: confuse a cat blurb text --- Signed-off-by: Christian Heimes <christian@python.org>
@matrixisematrixise changed the title Pr 184blurb: get BPO# from branch, add commit template - update the PRFeb 15, 2019
@matrixise
Copy link
MemberAuthor

Updated and rebased with the master branch.

@matrixise
Copy link
MemberAuthor

Thanks @Mariatta

branch_bpo, branch_suffix=get_bpo_git_branch()

init_tmp_with_template()
withopen(tmp_path, "wt", encoding="utf-8") asf:
Copy link
Member

Choose a reason for hiding this comment

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

Could be

Suggested change
withopen(tmp_path, "wt", encoding="utf-8") asf:
pathlib.Path(tmp_path).write_text(template.format(bpo=branch_bpo))

@larryhastings
Copy link
Contributor

So, in general I don't like this approach. I propose an alternate approach, which you can see in #312 . In short: add "--bpo" and "--section" flags to "blurb add", letting you specify those fields on the command-line. This will let @tiran automate the problem the way he likes, and presumably @matrixise and everybody else too. If #312 is accepted I plan to close this PR without accepting it.

@matrixise
Copy link
MemberAuthor

matrixise commented Mar 28, 2019 via email

@hugovk
Copy link
Member

Closing this in favour of the other solution at #312.

@hugovkhugovk closed this Mar 26, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@matrixise@larryhastings@hugovk@webknjaz@the-knights-who-say-ni@tiran