PeteGoo / tcSlackBuildNotifier

Posts build notifications to Slack
MIT License
311 stars 79 forks source link

Include triggered_by information into notification #123

Open mihasK opened 8 years ago

mihasK commented 8 years ago

It would be cool to have a possibility to include triggered_by: a user, or system(some trigger).

Detailed:

I would like to have a checkbox "Show who is triggered the build" on notification content panel (alongside with "Show committers", "Show build agent"). If the checkbox is set, a notification message will include such a sentence: "The build is triggered by john_doe". Or, if not a user but some trigger (schedule, VCS, etc.) runs the build, the sentence could be "The build is triggered by VSC trigger".

Of course if this information is available from teamcity API. But I think it's available because we can see "Triggered by:" field on details panel of a build on TeamCity. I'm interested in this feature because it would be really useful on our project, where overwhelming majority of builds are triggered by people, and a role of VCS triggering is minimal (it's a specific workflow, but I think it's not very rare one, since TeamCity is so powerfull, and users go to it exactly in case of specific workflows :) ). Another solution that would satisfy my request is to have possibility to specify a content of notification directly, and teamcity variables substitution would work there(so I would insert something like this: The build is triggered by %teamcity.build.triggered_by%). However, of course, I understand that it's a lot more difficult to implement and that's in your plans.

marvin-w commented 8 years ago

Hello,

thanks your suggestion.

It would be cool if you could tell us in a bit more detail what you want.

Thanks in advice, Pointer

mihasK commented 8 years ago

I would like to have a checkbox "Show who is triggered the build" on notification content panel (alongside with "Show committers", "Show build agent"). If the checkbox is set, a notification message will include such a sentence: "The build is triggered by john_doe". Or, if not a user but some trigger (schedule, VCS, etc.) runs the build, the sentence could be "The build is triggered by VSC trigger".

Of course if this information is available from teamcity API. But I think it's available because we can see "Triggered by:" field on details panel of a build on TeamCity. I'm interested in this feature because it would be really useful on our project, where overwhelming majority of builds are triggered by people, and a role of VCS triggering is minimal (it's a specific workflow, but I think it's not very rare one, since TeamCity is so powerfull, and users go to it exactly in case of specific workflows :) ). Another solution that would satisfy my request is to have possibility to specify a content of notification directly, and teamcity variables substitution would work there(so I would insert something like this: The build is triggered by %teamcity.build.triggered_by%). However, of course, I understand that it's a lot more difficult to implement and that's in your plans.

Anyway, thanks for a great plugin, it's really the coolest slack notificator!

marvin-w commented 8 years ago

Thanks for the detailed explanation! :)

mihasK commented 8 years ago

how much chances are that it will be implemented soon, or I should rather try to patch the code by myself (I don't think I'm able to make a full-fledged pull request, but just put this info in notification message somehow is in my power) ?

marvin-w commented 8 years ago

Hi,

Unfortunately there are other issues with higher priority. So I believe your chances are fairly low. A refactoring of the current t code base should take place before we implement new features.

You are very welcome to open a PR so that we can use the code in an upcoming release.

Best regards Pointer

danieljimenez commented 7 years ago

+1