Add an extension for notifying Slack.com

Review Request #6024 — Created June 23, 2014 and submitted

david
rb-extension-pack
e851f7b...
reviewboard

Slack.com is a popular business chat service which targets software developers.
One of its neat features is that it integrates with a lot of third-party
services, allowing them to send notifications.

This change adds a new extension which integrates Review Board with Slack,
using their "incoming webhooks" integration. This will notify for all of the
usual events, including links to the affected review requests.

Configured this extension in my local devserver and ran through the motions.

Description From Last Updated

Col: 80 E501 line too long (99 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (80 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (82 > 79 characters)

reviewbotreviewbot

Shouldn't we copyright Beanbag, Inc.?

chipx86chipx86

No blank line here.

chipx86chipx86

Col: 80 E501 line too long (99 > 79 characters)

reviewbotreviewbot

This is going to break as soon as we do an update that in any way modifies the file. If ...

chipx86chipx86

You shouldn't need the default, since RB already defaults to http, and get() will fall back on that.

chipx86chipx86

Do we also need to escape the path?

chipx86chipx86

Since type is a reserved word, we should probably use status or something.

chipx86chipx86

Can we use the ReviewRequest.* constants, like SUBMITTED?

chipx86chipx86

Should compare with BaseComment.OPEN.

chipx86chipx86

No blank line.

chipx86chipx86

Missing periods in the help text. Is there any URL we can link to for finding the webhook URL? The ...

chipx86chipx86

We should use from reviewboard.extensions.packaging import setup here.

chipx86chipx86

Let's add the version stuff to rbslack/__init__.py, for consistency and for releases with the new build stuff.

chipx86chipx86

We should attribute this to Beanbag, like the other extensions have.

chipx86chipx86

Col: 80 E501 line too long (91 > 79 characters)

reviewbotreviewbot

We should switch to "Slack" here and all other places where we refer to their name. The logo shows "#slack," ...

chipx86chipx86

We should set released to False up until we do the release. Also, before we label this 1.0, I want ...

chipx86chipx86

Should we make this a hidden setting (just an entry in default_settings)? We could then set it to "RBCommons" when ...

chipx86chipx86

The wording feels odd. Maybe something like "The name of the channel review request updates are sent to."?

chipx86chipx86

No need for this anymore.

chipx86chipx86

We should also add classifiers to this. There's a brand new classifier we should also provide: Framework :: Review Board

chipx86chipx86

This should be "Slack".

chipx86chipx86
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbslack/rbslack/admin_urls.py
        rbslack/rbslack/extension.py
        rbslack/rbslack/forms.py
        rbslack/setup.py
    
    Ignored Files:
        rbslack/README.md
        rbslack/COPYING
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbslack/rbslack/admin_urls.py
        rbslack/rbslack/extension.py
        rbslack/rbslack/forms.py
        rbslack/setup.py
    
    Ignored Files:
        rbslack/README.md
        rbslack/COPYING
    
    
  2. rbslack/rbslack/extension.py (Diff revision 1)
     
     
    Col: 80
     E501 line too long (99 > 79 characters)
    
  3. rbslack/rbslack/extension.py (Diff revision 1)
     
     
    Col: 80
     E501 line too long (80 > 79 characters)
    
  4. rbslack/rbslack/forms.py (Diff revision 1)
     
     
    Col: 80
     E501 line too long (82 > 79 characters)
    
  5. 
      
david
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        rbslack/rbslack/admin_urls.py
        rbslack/rbslack/extension.py
        rbslack/rbslack/forms.py
        rbslack/setup.py
    
    Ignored Files:
        rbslack/README.md
        rbslack/COPYING
    
    
    
    Tool: Pyflakes
    Processed Files:
        rbslack/rbslack/admin_urls.py
        rbslack/rbslack/extension.py
        rbslack/rbslack/forms.py
        rbslack/setup.py
    
    Ignored Files:
        rbslack/README.md
        rbslack/COPYING
    
    
  2. rbslack/rbslack/extension.py (Diff revision 2)
     
     
    Col: 80
     E501 line too long (99 > 79 characters)
    
  3. 
      
chipx86
  1. Can't wait to use this :D

  2. rbslack/COPYING (Diff revision 2)
     
     

    Shouldn't we copyright Beanbag, Inc.?

  3. rbslack/rbslack/extension.py (Diff revision 2)
     
     
     
     

    No blank line here.

  4. rbslack/rbslack/extension.py (Diff revision 2)
     
     

    This is going to break as soon as we do an update that in any way modifies the file.

    If we need to ship a stable logo image for this somewhere, I'd say let's just stick this in a reliable place in an S3 bucket. Probably the images.reviewboard.org bucket somewhere, maybe under a rbslack path so that we don't forget why it's there.

  5. rbslack/rbslack/extension.py (Diff revision 2)
     
     

    You shouldn't need the default, since RB already defaults to http, and get() will fall back on that.

  6. rbslack/rbslack/extension.py (Diff revision 2)
     
     

    Do we also need to escape the path?

    1. Path is part of the URL, so no.

  7. rbslack/rbslack/extension.py (Diff revision 2)
     
     

    Since type is a reserved word, we should probably use status or something.

    1. I'd love to, but the signal uses 'type' as a kwarg.

  8. rbslack/rbslack/extension.py (Diff revision 2)
     
     
     
     

    Can we use the ReviewRequest.* constants, like SUBMITTED?

  9. rbslack/rbslack/extension.py (Diff revision 2)
     
     

    Should compare with BaseComment.OPEN.

  10. rbslack/rbslack/forms.py (Diff revision 2)
     
     
     
     

    No blank line.

  11. rbslack/rbslack/forms.py (Diff revision 2)
     
     
     
     
     

    Missing periods in the help text.

    Is there any URL we can link to for finding the webhook URL? The account page somehow?

    1. Nothing that can be linked (It's something like "https://beanbag.slack.com/services/2412829182"). Even the account pages include their account name in the URL.

  12. rbslack/setup.py (Diff revision 2)
     
     

    We should use from reviewboard.extensions.packaging import setup here.

  13. rbslack/setup.py (Diff revision 2)
     
     

    Let's add the version stuff to rbslack/__init__.py, for consistency and for releases with the new build stuff.

  14. rbslack/setup.py (Diff revision 2)
     
     

    We should attribute this to Beanbag, like the other extensions have.

  15. 
      
david
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        rbslack/rbslack/admin_urls.py
        rbslack/rbslack/__init__.py
        rbslack/rbslack/forms.py
        rbslack/rbslack/extension.py
        rbslack/setup.py
    
    Ignored Files:
        rbslack/README.md
        rbslack/COPYING
    
    
    
    Tool: Pyflakes
    Processed Files:
        rbslack/rbslack/admin_urls.py
        rbslack/rbslack/__init__.py
        rbslack/rbslack/forms.py
        rbslack/rbslack/extension.py
        rbslack/setup.py
    
    Ignored Files:
        rbslack/README.md
        rbslack/COPYING
    
    
  2. rbslack/rbslack/extension.py (Diff revision 3)
     
     
    Col: 80
     E501 line too long (91 > 79 characters)
    
    1. I just set things up so that http://images.reviewboard.org/rbslack/logo.png will work.

  3. 
      
david
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        rbslack/rbslack/admin_urls.py
        rbslack/rbslack/__init__.py
        rbslack/rbslack/forms.py
        rbslack/rbslack/extension.py
        rbslack/setup.py
    
    Ignored Files:
        rbslack/README.md
        rbslack/COPYING
    
    
    
    Tool: Pyflakes
    Processed Files:
        rbslack/rbslack/admin_urls.py
        rbslack/rbslack/__init__.py
        rbslack/rbslack/forms.py
        rbslack/rbslack/extension.py
        rbslack/setup.py
    
    Ignored Files:
        rbslack/README.md
        rbslack/COPYING
    
    
  2. 
      
chipx86
  1. 
      
  2. rbslack/README.md (Diff revision 4)
     
     

    We should switch to "Slack" here and all other places where we refer to their name. The logo shows "#slack," but all text on their site referencing their service uses "Slack."

  3. rbslack/rbslack/__init__.py (Diff revision 4)
     
     

    We should set released to False up until we do the release.

    Also, before we label this 1.0, I want to spend some more time using this and testing it in production, and also figure out how we can make this all work well with RBCommons.

  4. rbslack/rbslack/extension.py (Diff revision 4)
     
     

    Should we make this a hidden setting (just an entry in default_settings)? We could then set it to "RBCommons" when we get it working there.

  5. rbslack/rbslack/forms.py (Diff revision 4)
     
     
     

    The wording feels odd. Maybe something like "The name of the channel review request updates are sent to."?

  6. rbslack/setup.py (Diff revision 4)
     
     

    No need for this anymore.

  7. 
      
chipx86
  1. 
      
  2. rbslack/setup.py (Diff revision 4)
     
     

    We should also add classifiers to this.

    There's a brand new classifier we should also provide:

    Framework :: Review Board
    
  3. 
      
david
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbslack/rbslack/admin_urls.py
        rbslack/rbslack/__init__.py
        rbslack/rbslack/forms.py
        rbslack/rbslack/extension.py
        rbslack/setup.py
    
    Ignored Files:
        rbslack/README.md
        rbslack/COPYING
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbslack/rbslack/admin_urls.py
        rbslack/rbslack/__init__.py
        rbslack/rbslack/forms.py
        rbslack/rbslack/extension.py
        rbslack/setup.py
    
    Ignored Files:
        rbslack/README.md
        rbslack/COPYING
    
    
  2. 
      
chipx86
  1. 
      
  2. rbslack/README.md (Diff revision 5)
     
     

    This should be "Slack".

  3. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (3af20cd).
Loading...