Skip TeamCity trigger on branch delete and support MR triggers
What does this MR do?
This is a community contribution take over from: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20990.
Closes: https://gitlab.com/gitlab-org/gitlab-ce/issues/17690 Closes: https://gitlab.com/gitlab-org/gitlab-ce/issues/13871
credits to @Nikkes and @rayphi
This MR targets 2 issues related to TeamCity integration: https://gitlab.com/gitlab-org/gitlab-ce/issues/17690 and https://gitlab.com/gitlab-org/gitlab-ce/issues/13871
With this change we skip sending a push event to TeamCity if related to the branch being deleted. Also, we add support for merge request events, as we do for Jenkins integration, so that TeamCity can build on a merge request ref.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team