www-infrastructure-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (INFRA-11462) change lucene git email subject format
Date Tue, 15 Mar 2016 21:51:33 GMT

    [ https://issues.apache.org/jira/browse/INFRA-11462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15196334#comment-15196334
] 

Hoss Man commented on INFRA-11462:
----------------------------------

>> Git Push Summary is for when you perform non-commit operations such as
>> deleting/creating branches (or in some cases merges), in which there is no "this
branch" 

Hmm, our impression/hope was that creating/deleting a branch would cause the %(branch)s (and
%(short_branch)s) variables to be filled in so they could still be used in the subject pattern.
 If that's not possible/straight-forward then alas.

So that I can better relay info to the lucene community on when/what exactly to expect for
various git operations, can you please clarify 2 remaining questions I have...

1) what are the circumstances where the "(or in some cases merges)" part of your comment comes
into play?  So far all merges we've seen have come through as regular commits, with the "Branch"
set to the target branch of the merge.

2) if a committer does a "git push --all" (or a git push that names explicit branches) such
that a new branch is created and additional commits (on that new branch and/or other existing
branches) are all pushed at once, will that cause a "git push summary" email (for the branch
creation) as well as the normal "commit" emails?  Will the "References:" and "In-Reply-To:"
headers identify the "git push summary" as part of the same push as the other commits?



(FWIW: i'll repeat my offer from a few weeks ago on hip chat here: if you can provide me with
a copy of the git hook code that sends the emails, i'm happy to spend time reviewing it to
understand these issues myself and try to use my own time to implement improvements &
provide a patches rather then just pestering you/infra)


> change lucene git email subject format
> --------------------------------------
>
>                 Key: INFRA-11462
>                 URL: https://issues.apache.org/jira/browse/INFRA-11462
>             Project: Infrastructure
>          Issue Type: Task
>          Components: Git
>            Reporter: Hoss Man
>            Assignee: Daniel Gruno
>            Priority: Minor
>
> Following from the discussion in this thread...
> http://mail-archives.apache.org/mod_mbox/lucene-dev/201602.mbox/%3Calpine.DEB.2.11.1602161145380.2413@tray%3E
> The Lucene project would like to request that the automated git commit emails sent to
commits@lucene be updated to match the following  template...
> "%(repo_name)s:%(short_branch)s: %(subject)s"
> ...where "short_branch" is a new variable based on the following rules...
> >> "%(shortbranch)s" should be the result of regex stripping 
> >> "^refs\/(heads\/)?" from the full branch path.  
> >> 
> >> So "refs/heads/branch_7_5 => "branch_7_5" 
> >> 
> >> But "refs/tags/releases/lucene-solr/7.5.0"
> >>  => "tags/releases/lucene-solr/7.5.0" 
> We would also like to request that this subject pattern is used for *any* git commit
related notification emails.  We're not sure why, but at the moment we seem to have two diff
subject patterns -- one for when normal commits are pushed, and one for when branches / tags
are made that (currently) all have a subject of "[lucene-solr] Git Push Summary"  If these
are radically diff code paths in the email code because no "commit message" is available when
tags/branches are created, we'd still like the rest of the email subject to be consistent
in these cases: "%(repo_name)s:%(short_branch)s: "
> ---
> FWIW: I chimed in on hipchat a few weeks back asking about the code used to send git
commit emails with the hope of being able to offer a patch to add "short_branch" as a format
options, but apparently the code used is in an infra private repo -- so the best I can do
is offer this python snippet which should help as a starting point for supporting "short_branch"
as a format option....
> short_branch_pat = re.compile(r"^refs\/(heads\/)?")
> short_branch = short_branch_pat.sub('', branch)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message