Hi Christian -- thanks for the detailed reply. So to explain the request in 
more detail:

We have no concern about the Summary field, nor the repo name or branch. 
It's really only the Description field we care about because it contains 
potentially unbounded amounts of text, and maybe sensitive source code that 
we wouldn't necessarily want unexpected Slack users seeing. Slack channel 
membership is not as tightly controlled as Git repo access is for 
developers -- it's pretty easy to invite someone to a Slack channel, so the 
person posting doesn't always know the exact readership.

Interesting that you mentioned screenshots -- I tested a review with a 
screenshot and that didn't show up in Slack in fact, so I assumed it was 
deliberate. I think if possible we would want to skip attachments in 
principle. It's less clear cut than the Description and probably wouldn't 
be a killer as long as they were just URLs, though if they displayed as 
full images in Slack it would bulk out the notification a lot. We'd prefer 
the Slack notification to be a basic "something changed" type of thing and 
people who care can follow the link back to the review.

Apart from code confidentiality issues, our Slack admins are very nervous 
about any automated process making posts without some kind of size sanity 
checks. I think if the Description field had a maximum length (we'd 
probably choose 100 or 200 chars) that would be a big help to get it 
approved.

Thanks for the subclassing suggestion. I might take a look at that.

-- Ben.

On Wednesday, 23 October 2019 06:58:56 UTC+1, Christian Hammond wrote:
>
> Hi Ben,
>
> We don't have any way of doing this built-in, I'm afraid. I want to 
> understand this in more detail.
>
> So the main concern is that you're looking to limit what information Slack 
> receives, and the main source of this information in your case would be in 
> the description, correct? Are there any concerns about the summary or any 
> fields (branch, repository, etc.) being sent as well? If a review request 
> has an attached screenshot, it will be shown as well, so would that also 
> need to be filtered out?
>
> One approach, which admittedly is more involved but gives you more control 
> over what gets sent, is to write your own extension that registers a 
> subclass of our own SlackIntegration (
> https://github.com/reviewboard/rbintegrations/blob/master/rbintegrations/slack/integration.py#L155
> ).
>
> That subclass would override notify(), altering some of the fields and 
> stripping away the description, screenshots, or whatever else you need to 
> remove, and then call the parent with the new method.
>
> Your Extension subclass would be simple, just something like:
>
>
>     from reviewboard.extensions.base import Extension
>     from reviewboard.extensions.hooks import IntegrationHook
>
>     class MySlackExtension(Extension):
>         def initialize(self):
>             IntegrationHook(self, MySlackIntegration)
>
>
> Christian
>
> On Tue, Oct 22, 2019 at 8:03 AM Ben ST <b...@cantab.net <javascript:>> 
> wrote:
>
>> Hi
>>
>> I am experimenting with the Slack integration (RB 3.0.15). Currently all 
>> of the RB Description body is sent to Slack. Is there a way to limit the 
>> post just to the Summary?
>>
>> For confidentiality/security reasons our system admins don't want code 
>> posted into Slack channels, at least not by an automated system. So I can't 
>> use the Slack integration as it is. Or if there was a way to limit the 
>> Description to a max length like 250 chars, that would be good enough.
>>
>> Thanks.
>>
>> -- 
>> Supercharge your Review Board with Power Pack: 
>> https://www.reviewboard.org/powerpack/
>> Want us to host Review Board for you? Check out RBCommons: 
>> https://rbcommons.com/
>> Happy user? Let us know! https://www.reviewboard.org/users/
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Review Board Community" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to revie...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/reviewboard/511c5ed2-6d32-471a-b7de-38d22479abca%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/reviewboard/511c5ed2-6d32-471a-b7de-38d22479abca%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> Christian Hammond
> President/CEO of Beanbag <https://www.beanbaginc.com/>
> Makers of Review Board <https://www.reviewboard.org/>
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/reviewboard/75f81bc2-e730-419e-abd5-553d16b4297e%40googlegroups.com.

Reply via email to