diff mbox

views: Add List-Id to mbox

Message ID 1481456373-7488-1-git-send-email-thomas.monjalon@6wind.com
State Rejected
Headers show

Commit Message

Thomas Monjalon Dec. 11, 2016, 11:39 a.m. UTC
The List-Id header is retrieved from the Project object.

Fixes #53

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 patchwork/views/__init__.py | 1 +
 1 file changed, 1 insertion(+)

Comments

Andrew Donnellan Dec. 12, 2016, 2:44 a.m. UTC | #1
On 11/12/16 22:39, Thomas Monjalon wrote:
> The List-Id header is retrieved from the Project object.
>
> Fixes #53
>
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>

> ---
>  patchwork/views/__init__.py | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/patchwork/views/__init__.py b/patchwork/views/__init__.py
> index 58fb29f..db11e03 100644
> --- a/patchwork/views/__init__.py
> +++ b/patchwork/views/__init__.py
> @@ -389,6 +389,7 @@ def patch_to_mbox(patch):
>      if patch.delegate:
>          mail['X-Patchwork-Delegate'] = str(patch.delegate.email)
>      mail['Message-Id'] = patch.msgid
> +    mail['List-Id'] = patch.project.listid
>      mail.set_unixfrom('From patchwork ' + patch.date.ctime())
>
>      copied_headers = ['To', 'Cc', 'Date']
>
Stephen Finucane Dec. 12, 2016, 11:12 a.m. UTC | #2
On Sun, 2016-12-11 at 12:39 +0100, Thomas Monjalon wrote:
> The List-Id header is retrieved from the Project object.
> 
> Fixes #53
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Thanks, Thomas. Before merging, would it be possible to get a test to
make sure this doesn't regress? A quick look suggests 'test_mboxviews'
is the place to do this.

Cheers,
Stephen
Thomas Monjalon Dec. 12, 2016, 2:36 p.m. UTC | #3
2016-12-12 11:12, Stephen Finucane:
> On Sun, 2016-12-11 at 12:39 +0100, Thomas Monjalon wrote:
> > The List-Id header is retrieved from the Project object.
> > 
> > Fixes #53
> > 
> > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> 
> Thanks, Thomas. Before merging, would it be possible to get a test to
> make sure this doesn't regress? A quick look suggests 'test_mboxviews'
> is the place to do this.

I've just seen you did already it:
	https://patchwork.ozlabs.org/patch/696885/

Why not merging your patch instead?
Stephen Finucane Dec. 12, 2016, 3:50 p.m. UTC | #4
On Mon, 2016-12-12 at 15:36 +0100, Thomas Monjalon wrote:
> 2016-12-12 11:12, Stephen Finucane:
> > On Sun, 2016-12-11 at 12:39 +0100, Thomas Monjalon wrote:
> > > The List-Id header is retrieved from the Project object.
> > > 
> > > Fixes #53
> > > 
> > > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> > 
> > Thanks, Thomas. Before merging, would it be possible to get a test
> > to
> > make sure this doesn't regress? A quick look suggests
> > 'test_mboxviews'
> > is the place to do this.
> 
> I've just seen you did already it:
> 	https://patchwork.ozlabs.org/patch/696885/
> 
> Why not merging your patch instead?

Because I'd forgotten I'd done it :) Sure, I'll merge mine so

Stephen
diff mbox

Patch

diff --git a/patchwork/views/__init__.py b/patchwork/views/__init__.py
index 58fb29f..db11e03 100644
--- a/patchwork/views/__init__.py
+++ b/patchwork/views/__init__.py
@@ -389,6 +389,7 @@  def patch_to_mbox(patch):
     if patch.delegate:
         mail['X-Patchwork-Delegate'] = str(patch.delegate.email)
     mail['Message-Id'] = patch.msgid
+    mail['List-Id'] = patch.project.listid
     mail.set_unixfrom('From patchwork ' + patch.date.ctime())
 
     copied_headers = ['To', 'Cc', 'Date']