tools.linux.kernel.org archive mirror
 help / color / mirror / Atom feed
* b4 ty feature requests
@ 2020-04-17 15:44 Mark Brown
  2020-04-17 16:14 ` Konstantin Ryabitsev
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2020-04-17 15:44 UTC (permalink / raw)
  To: Konstantin Ryabitsev; +Cc: tools

[-- Attachment #1: Type: text/plain, Size: 428 bytes --]

I've started using b4 ty to generate thanks mails in production and it
seems to be working very well for me so far, thanks!

One thing that would be nice would be mechanism to supply some
additional values to be filled in the templates - I want to be able to
tell people what tree and branch I applied things to.  A command line
option to set the templates might also work but would be clunkier for
me.

Thanks,
Mark

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: b4 ty feature requests
  2020-04-17 15:44 b4 ty feature requests Mark Brown
@ 2020-04-17 16:14 ` Konstantin Ryabitsev
  2020-04-17 16:39   ` Mark Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Konstantin Ryabitsev @ 2020-04-17 16:14 UTC (permalink / raw)
  To: Mark Brown; +Cc: tools

On Fri, Apr 17, 2020 at 04:44:30PM +0100, Mark Brown wrote:
> I've started using b4 ty to generate thanks mails in production and it
> seems to be working very well for me so far, thanks!

Excellent. Thanks for helping iron out the kinks.

> One thing that would be nice would be mechanism to supply some
> additional values to be filled in the templates - I want to be able to
> tell people what tree and branch I applied things to.  A command line
> option to set the templates might also work but would be clunkier for
> me.

Branch would be easy, e.g.:

---
Applied to ${branch}, thanks!
---

I'm not sure how to convey the tree information. Would it be a sane 
approach to try to use current dirname as default, overridable via a 
b4.thanks-tree-name value? E.g.:

---
Applied to ${treename} ${branch} branch, thanks!
---

Becomes:

---
Applied to spi.git for-next branch, thanks!
---

-K

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: b4 ty feature requests
  2020-04-17 16:14 ` Konstantin Ryabitsev
@ 2020-04-17 16:39   ` Mark Brown
  2020-04-17 16:55     ` Konstantin Ryabitsev
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2020-04-17 16:39 UTC (permalink / raw)
  To: Konstantin Ryabitsev; +Cc: tools

[-- Attachment #1: Type: text/plain, Size: 2078 bytes --]

On Fri, Apr 17, 2020 at 12:14:24PM -0400, Konstantin Ryabitsev wrote:
> On Fri, Apr 17, 2020 at 04:44:30PM +0100, Mark Brown wrote:

> > One thing that would be nice would be mechanism to supply some
> > additional values to be filled in the templates - I want to be able to
> > tell people what tree and branch I applied things to.  A command line
> > option to set the templates might also work but would be clunkier for
> > me.

> Branch would be easy, e.g.:

> ---
> Applied to ${branch}, thanks!
> ---

> I'm not sure how to convey the tree information. Would it be a sane 
> approach to try to use current dirname as default, overridable via a 
> b4.thanks-tree-name value? E.g.:

> ---
> Applied to ${treename} ${branch} branch, thanks!
> ---

That wouldn't work well for me since I have a single repo with multiple
remotes - I'm invoking b4 as:

	b4 ty -b remote/branch -a

so I'd need to switch out the config file to update the variable for the
tree name and the branch name would I think come out wrong.  People
probably would mostly understand the short names I use for my remotes so
it wouldn't be the end of the world to just say ${branch} and have it
show up as remote/branch but I know inexperienced contributors sometimes
find figuring out exactly which tree you mean a bit confusing so the URL
is useful for them.

In that particular usage b4 could parse out the fact that it's a remote
based on asking git-remote if the thing before the first / is a remote
and use the info from that to rewrite such that the branch gets expanded
into a GIT URL plus branch but that may be a bit too much DWIM.  You'd
get something like

	b4 ty -b asoc/for-5.8 -a

with a template of

	Applied to ${branch}

generating

	Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.8

TBH I'd personally be happy just specifying variables I name on the
command line (the actual b4 invocation is scripted for me) and that's
what I'd been imagining, although something more fancy would be very
nice.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: b4 ty feature requests
  2020-04-17 16:39   ` Mark Brown
@ 2020-04-17 16:55     ` Konstantin Ryabitsev
  2020-04-17 17:09       ` Mark Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Konstantin Ryabitsev @ 2020-04-17 16:55 UTC (permalink / raw)
  To: Mark Brown; +Cc: tools

On Fri, Apr 17, 2020 at 05:39:39PM +0100, Mark Brown wrote:
> > I'm not sure how to convey the tree information. Would it be a sane 
> > approach to try to use current dirname as default, overridable via a 
> > b4.thanks-tree-name value? E.g.:
> 
> > ---
> > Applied to ${treename} ${branch} branch, thanks!
> > ---
> 
> That wouldn't work well for me since I have a single repo with multiple
> remotes - I'm invoking b4 as:
> 
> 	b4 ty -b remote/branch -a

Ah, excellent data point. How about we approach it from a slightly 
different angle. We already allow setting a per-repo 
"thanks-commit-url-mask", but how about also a way to record that in the 
remote section of .git/config, e.g.:

[remote "foo"]
  url = git@gitolite.kernel.org:pub/scm/linux/kernel/git/foo/linux
  fetch = +refs/heads/*:refs/remotes/foo/*
  b4-treename = "foo/linux.git"
  b4-commit-url-mask = "https://git.kernel.org/foo/c/%.8s"

With a template:

---
Applied to ${treename} ${branch}:

${summary}
---

This way when you do `b4 ty -b foo/for-5.8 -a`, you get:

---
Applied to foo/linux.git for-5.8:

[1/2] doc: importance of being foo
      https://git.kernel.org/foo/c/1234abcd
[2/2] drivers/foo: make sure to instantiate foo
      https://git.kernel.org/foo/c/abcd1234
---

Would that work?

-K

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: b4 ty feature requests
  2020-04-17 16:55     ` Konstantin Ryabitsev
@ 2020-04-17 17:09       ` Mark Brown
  2020-04-17 19:06         ` Konstantin Ryabitsev
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2020-04-17 17:09 UTC (permalink / raw)
  To: Konstantin Ryabitsev; +Cc: tools

[-- Attachment #1: Type: text/plain, Size: 885 bytes --]

On Fri, Apr 17, 2020 at 12:55:37PM -0400, Konstantin Ryabitsev wrote:

> Ah, excellent data point. How about we approach it from a slightly 
> different angle. We already allow setting a per-repo 
> "thanks-commit-url-mask", but how about also a way to record that in the 
> remote section of .git/config, e.g.:

> [remote "foo"]
>   url = git@gitolite.kernel.org:pub/scm/linux/kernel/git/foo/linux
>   fetch = +refs/heads/*:refs/remotes/foo/*
>   b4-treename = "foo/linux.git"
>   b4-commit-url-mask = "https://git.kernel.org/foo/c/%.8s"

> Would that work?

I think so, yes - the treename could even default to either url or the
remote name so a lot of the time it'd not even need to be set.

One thing to watch out for is that you can name branches foo/bar without
them being remotes so just because there's a / that doesn't mean the
branch is a remote branch.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: b4 ty feature requests
  2020-04-17 17:09       ` Mark Brown
@ 2020-04-17 19:06         ` Konstantin Ryabitsev
  2020-04-20 15:46           ` Mark Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Konstantin Ryabitsev @ 2020-04-17 19:06 UTC (permalink / raw)
  To: Mark Brown; +Cc: tools

On Fri, Apr 17, 2020 at 06:09:04PM +0100, Mark Brown wrote:
> > [remote "foo"]
> >   url = git@gitolite.kernel.org:pub/scm/linux/kernel/git/foo/linux
> >   fetch = +refs/heads/*:refs/remotes/foo/*
> >   b4-treename = "foo/linux.git"
> >   b4-commit-url-mask = "https://git.kernel.org/foo/c/%.8s"
> 
> > Would that work?
> 
> I think so, yes - the treename could even default to either url or the
> remote name so a lot of the time it'd not even need to be set.
> 
> One thing to watch out for is that you can name branches foo/bar without
> them being remotes so just because there's a / that doesn't mean the
> branch is a remote branch.

I committed a change that should do the above (with proper precautions).  
Please try it out (see .example files for ${branch} and ${treename} 
usage examples).

-K

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: b4 ty feature requests
  2020-04-17 19:06         ` Konstantin Ryabitsev
@ 2020-04-20 15:46           ` Mark Brown
  2020-04-20 17:03             ` Konstantin Ryabitsev
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2020-04-20 15:46 UTC (permalink / raw)
  To: Konstantin Ryabitsev; +Cc: tools

[-- Attachment #1: Type: text/plain, Size: 539 bytes --]

On Fri, Apr 17, 2020 at 03:06:52PM -0400, Konstantin Ryabitsev wrote:
> On Fri, Apr 17, 2020 at 06:09:04PM +0100, Mark Brown wrote:

> > One thing to watch out for is that you can name branches foo/bar without
> > them being remotes so just because there's a / that doesn't mean the
> > branch is a remote branch.

> I committed a change that should do the above (with proper precautions).  
> Please try it out (see .example files for ${branch} and ${treename} 
> usage examples).

This all seems to be working great, thanks!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 499 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: b4 ty feature requests
  2020-04-20 15:46           ` Mark Brown
@ 2020-04-20 17:03             ` Konstantin Ryabitsev
  0 siblings, 0 replies; 8+ messages in thread
From: Konstantin Ryabitsev @ 2020-04-20 17:03 UTC (permalink / raw)
  To: Mark Brown; +Cc: tools

On Mon, Apr 20, 2020 at 04:46:09PM +0100, Mark Brown wrote:
> > > One thing to watch out for is that you can name branches foo/bar 
> > > without
> > > them being remotes so just because there's a / that doesn't mean the
> > > branch is a remote branch.
> 
> > I committed a change that should do the above (with proper precautions).  
> > Please try it out (see .example files for ${branch} and ${treename} 
> > usage examples).
> 
> This all seems to be working great, thanks!

Good to hear. I'll probably release 0.4.0 with this set of features some 
time mid-week.

-K

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-04-20 17:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-17 15:44 b4 ty feature requests Mark Brown
2020-04-17 16:14 ` Konstantin Ryabitsev
2020-04-17 16:39   ` Mark Brown
2020-04-17 16:55     ` Konstantin Ryabitsev
2020-04-17 17:09       ` Mark Brown
2020-04-17 19:06         ` Konstantin Ryabitsev
2020-04-20 15:46           ` Mark Brown
2020-04-20 17:03             ` Konstantin Ryabitsev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).