Age | Commit message (Collapse) | Author |
|
Force the use of smtp server when sending anything other than patches
(e.g. b4 ty automated responses).
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
This implements most of the web endpoint submission functionality.
Completely undocumented and needs a lot more testing before it's useful,
but we're getting close.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
This is the first rough implementation of "b4 submit". Currently
implemented:
- b4 submit --new : to start a new branch
- b4 submit --edit-cover : to edit the cover message
- b4 submit --update-trailers : to receive latest trailer updates from
the mailing lists
- b4 submit --send : sends the messages using existing git.sendemail
configs
For details, see "b4 submit --help".
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Yes, I debug with print().
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
A lot of maintainers use patchwork alongside b4, to make it easier to
track patches and rely on some CI integration. This commit adds some
basic patchwork integration:
- on "b4 am", "b4 shazam", "b4 pr" we will mark the relevant patchwork
entries as "Under Review"
- on "b4 ty" we can set these patches as "Accepted"
- on "b4 ty -d" we can set them as "Deferred"
To make it work, the following entries must be present in the repository
used with b4:
[b4]
pw-key = (your API token)
pw-url = https://patchwork.kernel.org
pw-project = (your project, e.g. linux-usb)
pw-review-state = under-review
pw-accept-state = accepted
pw-discard-state = deferred
To get your patchwork API token, go to your patchwork profile page.
The pw-accept-state and pw-discard-state can be overridden using the
--pw-set-state flag to "b4 ty". E.g. if you wanted to mark the patches
as "Not applicable":
b4 ty -d 5 --pw-set-state not-applicable
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
With codeaurora.org accounts no longer accepting mail, add support to
exclude addresses when generating b4-ty mail. Additionally, support
mailmap replacements by running every address through
"git check-mailmap".
Requested-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
There appears to be a bug in smtplib that doesn't properly support 8-bit
content even when upstream SMTP gateway supports 8BITMIME (they all do,
it's not 90s any more). Work around this by passing the message payload
as bytes instead of string.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Test out and fix the bugs introduced by switching flags.
Reported-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
I'm felling comfortable that "b4 ty" is sufficiently mature at this
point to implement sending thank-yous directly. This is only the initial
implementation that covers only the very basic parts of git's sendemail
configuration options, but this should actually cover 90% of cases if
not more.
One important caveat -- I moved the "b4 ty -s" flag to be "b4 ty -t" in
order to disambiguate it from the capital -S (that actually does the
sending). Since "b4 ty" is still marked as an experimental feature, I
feel we can do this without much impact.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Allow people to set up their own preferred merge templates, using the
netdev standard as default.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
When I changed auto_locate_series to return the exact patch number in
addition to the matching commit_id, I introduced an off-by-one that
caused all tracked series to start matching.
Reported-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Make sure we always create a Date: header, and that we're not crashing
when we try to parse a message without a Date: header.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Record patch counters when we start tracking series so we properly
indicate in the thank-you note which ones got applied. Additionally,
indicate in the subject when we're reporting on a subset of a larger
series.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
It seems we don't have much control over what as_bytes() does, so switch
to using as_string(), setting our policy, and making sure that
content-transfer-encoding is set to 8bit.
Reported-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Apparently, merely passing policy= doesn't generate the full set of
required headers, so make sure we do set_charset('utf-8').
Reported-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Git has a lot of internal logic matching free-form branch names to
actual branches, so don't try to second-guess what it finds acceptable.
Reported-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Git will try to helpfully disambiguate, but we just need consistency, so
always ask for a full refname.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Not all local branches are going to have matching [branch] entries --
sometimes there is only a [remote]. Deal with both cases.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
While trying to be more permissive with messages selected manually with
-s, we broke auto-thankanator by making it match everything.
Reported-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Track message-id for each patch and try to apply to the Link: or
Message-Id: trailers, if we find them.
Suggested-by: Jason Gunthorpe <jgg@ziepe.ca>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Our mapping of local to remote branches was very naive and failed when
remote names didn't exactly match heads. Improve it using suggestions
from Will Deacon.
Link: https://linux.kernel.org/g/tools/message/140
Reported-by: Will Deacon <will@kernel.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Instead of insisting that people put in specific numbers, allow them to
specify ranges, such as:
b4 ty -s 1-3,5,7-
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
This is our fail-through treename, so if we weren't able to figure out
anything about it, then call it a "local tree" instead of "undefined".
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
When running rev-list, be mindful of which branch we need to operate on,
otherwise it always runs on the current branch.
Reported-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
You can use ${branch} and ${treename} (if you set b4.thanks-treename).
See .example files on some hints on how to use them.
Suggested-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
- Properly expand ~ and env vars like $HOME in template paths
- Allow partial matching of series (with a warning)
- Allow using remote branches with -b
- Always fall back to subject matching for patches
- Tweak to the summary output
Suggested-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Don't tell us to run git send-email when there's nothing to send.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Instead of bailing out when we can't find a match for a series, skip it
and move to the next one in the queue.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Using strict attestation hashes for auto-thankinator is problematic,
because "git am" uses a certain degree of fuzzing, so when we try to
find applied patches by running "git diff" on actual commits, line
counts may not be bit-for-bit identical.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
If we find a ~/.signature, then use it for making a default ${signature}
value, otherwise make a "Name <email>" boring one.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
They are much more useful if b4.thanks-commit-url-mask is set, but even
without them this will list all subjects and corresponding commit IDs.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
Looks like some of the patches sent from quilt (at least from Andrew
Morton) are not properly parsed by git patch-id, so use our own patch
hashing routines, even if this means we're likely going to miss some of
the patches that were edited by maintainers.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|
|
New experimental feature that aims to simplify a very common "thanks,
applied" kind of feedback often expected of maintainers. Still needs
documentation to explain its usage.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
|