-
-
Notifications
You must be signed in to change notification settings - Fork 60
blurb: get BPO# from branch, add commit template - update the PR #308
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
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 <[email protected]>
Updated and rebased with the master branch. |
Thanks @Mariatta |
|
||
init_tmp_with_template() | ||
with open(tmp_path, "wt", encoding="utf-8") as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be
with open(tmp_path, "wt", encoding="utf-8") as f: | |
pathlib.Path(tmp_path).write_text(template.format(bpo=branch_bpo)) |
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. |
👍 for the #312
I am fine if you close this PR and thank you for the other solution.
|
Closing this in favour of the other solution at #312. |
Update of the pull request of @tiran
Co-authored-by: Christian Heimes [email protected]