www-infrastructure-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Gruno (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (INFRA-11462) change lucene git email subject format
Date Wed, 16 Mar 2016 07:30:33 GMT

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

Daniel Gruno commented on INFRA-11462:
--------------------------------------

It would appear that 'Git Push Summary' only comes into play when branches/tags are created
or destroyed.
All that email does it list which branches were affected. If any code was changed in the push,
that will come in a separate email.

You can look at the email formatter at https://git-wip-us.apache.org/repos/infra?p=asfgit-admin.git;a=blob_plain;f=asfgit/emailfmt.py
although that repo is slightly out of date (doesn't contain the short branch variable).

> 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