kria / TfsNotificationRelay

An extensible plugin for TFS that sends notifications to Slack, HipChat and IRC
GNU General Public License v3.0
116 stars 32 forks source link

Support for TFS project to HipChat Room mapping #31

Closed highsierra closed 8 years ago

highsierra commented 8 years ago

The current version seems to see all notifications to one single room in HipChat. Would really be useful if it can support TFS project to HipChat room mapping, so the notifications for a specific project would go to a project specific room in HipChat.

kria commented 8 years ago

You can only send notifications to one HipChat room per bot, but you can have muliple bots that have different teamProject filters. Something like this should do what you want:

<bot id="hipChat1" type="DevCore.TfsNotificationRelay.HipChat.HipChatNotifier, DevCore.TfsNotificationRelay.HipChat" textId="htmltext">
  <botSettings>
    <add name="apiBaseUrl" value="https://api.hipchat.com/v2" />
    <add name="roomNotificationToken" value="<token>" />
    <add name="room" value="Project1" />
    <add name="standardColor" value="purple" />
    <add name="successColor" value="green" />
    <add name="errorColor" value="red" />
    <add name="notify" value="false" />
    <add name="messageFormat" value="html" />
  </botSettings>
  <eventRules>
    <rule notify="true" events="All" teamProject="Project1" />
  </eventRules>
</bot>
<bot id="hipChat2" basedOn="hipChat1">
  <botSettings>
    <add name="roomNotificationToken" value="<token>" />
    <add name="room" value="Project2" />
  </botSettings>
  <eventRules>
    <rule notify="true" events="All" teamProject="Project2" />
  </eventRules>
</bot>