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] [Assigned] (INFRA-11462) change lucene git email subject format
Date Mon, 14 Mar 2016 21:57:33 GMT

     [ https://issues.apache.org/jira/browse/INFRA-11462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Daniel Gruno reassigned INFRA-11462:

    Assignee: Daniel Gruno

> 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

View raw message