Uh oh!
There was an error while loading. Please reload this page.
blurb: get BPO# from branch, add commit template - update the PR - #308
Closed
matrixise wants to merge 3 commits into
Closed
blurb: get BPO# from branch, add commit template - update the PR#308matrixise wants to merge 3 commits into
matrixise wants to merge 3 commits into
Conversation
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>matrixise
commented
Feb 15, 2019
MemberAuthor
Updated and rebased with the master branch. |
matrixise
commented
Feb 19, 2019
MemberAuthor
Thanks @Mariatta |
| branch_bpo, branch_suffix = get_bpo_git_branch() | ||
| init_tmp_with_template() | ||
| with open(tmp_path, "wt", encoding="utf-8") as f: |
Member
There was a problem hiding this comment.
Could be
Suggested change
| withopen(tmp_path, "wt", encoding="utf-8") asf: | |
| pathlib.Path(tmp_path).write_text(template.format(bpo=branch_bpo)) |
larryhastings
commented
Feb 28, 2019
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
commented
Mar 28, 2019
via email
MemberAuthor
👍 for the #312
I am fine if you close this PR and thank you for the other solution. |
hugovk
commented
Mar 26, 2022
Member
Closing this in favour of the other solution at #312. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update of the pull request of @tiran
Co-authored-by: Christian Heimes christian@python.org