Commit Graph

62 Commits

Author SHA1 Message Date
GitLab Bot 454973238c Add latest changes from gitlab-org/gitlab@master 2021-05-06 21:10:07 +00:00
GitLab Bot ecf1ffc198 Add latest changes from gitlab-org/gitlab@master 2021-04-23 12:09:52 +00:00
GitLab Bot b6e611dd42 Add latest changes from gitlab-org/gitlab@master 2021-04-20 18:09:37 +00:00
GitLab Bot 40b78ea2b6 Add latest changes from gitlab-org/gitlab@master 2021-04-07 15:09:18 +00:00
GitLab Bot eb1755b2d9 Add latest changes from gitlab-org/gitlab@master 2021-03-02 21:11:07 +00:00
GitLab Bot b102159513 Add latest changes from gitlab-org/gitlab@master 2021-01-21 21:08:47 +00:00
GitLab Bot 1bdf79827c Add latest changes from gitlab-org/gitlab@master 2020-12-02 15:09:37 +00:00
GitLab Bot d47f9d2304 Add latest changes from gitlab-org/gitlab@master 2020-01-16 15:08:41 +00:00
GitLab Bot b7dfe2ae40 Add latest changes from gitlab-org/gitlab@master 2019-09-13 13:26:31 +00:00
Brandon Williams 2bd4d580d1
Add system hooks for project/group membership updates
When updating group and project members, new system hooks
`user_update_for_group` and `user_update_for_team` will be executed.

Fixes https://gitlab.com/gitlab-org/gitlab-ee/issues/12252
2019-09-02 18:35:36 -05:00
Heinrich Lee Yu fc22626f45 Remove deprecated uses of attribute_changed?
Prepares us for upgrade to Rails 5.2
2019-04-30 15:24:25 +08:00
gfyoung ddca49e4b5 Enable frozen string in apps/uploaders/*.rb
Partially addresses #47424.
2018-07-16 06:41:59 -07:00
Stan Hu 2d1ceca077 Don't error out in system hook if user has `nil` datetime columns
Deleting a user would fail in the system hooks if the user had
`nil` column in `datetime` or `updated_at` fields.

Closes #43871
2018-03-05 13:38:46 -08:00
Dmitriy Zaporozhets eff5746b5e Redesign plugins system
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2018-02-26 16:06:49 +02:00
Dmitriy Zaporozhets 5bb435d0e7 Remove plugin initializer and add plugins:validate rake task
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2018-02-26 16:06:49 +02:00
Dmitriy Zaporozhets 9be0c2734a Add external plugins support to extend system hooks
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2018-02-26 16:06:49 +02:00
Douwe Maan 8e9c073a14 Merge branch 'feature/merge-request-system-hook' into 'master'
System hooks for Merge Requests

See merge request gitlab-org/gitlab-ce!14387
2018-01-18 11:37:16 +00:00
Alexis Reigel a78abf3a00 use safer .hooks_for instead of .public_send
with .public_send we can't make sure that the scope on the model
actually exists.
2018-01-17 09:55:00 +01:00
Stan Hu 0d187a9a65 Log and send a system hook if a blocked user fails to login
Closes #41633
2018-01-14 22:22:06 -08:00
Douwe Maan 1e6ca3c41e Consistently schedule Sidekiq jobs 2017-12-05 11:59:39 +01:00
Winnie Hellmann 6f1a4ba457 Add system hooks user_rename and group_rename 2017-11-03 11:26:52 +00:00
Bob Van Landuyt 7dbf114f59 Use the correct project visibility in system hooks 2017-10-30 09:05:06 +01:00
Robert Speicher 260c8da060 Whitelist or fix additional `Gitlab/PublicSend` cop violations
An upcoming update to rubocop-gitlab-security added additional
violations.
2017-08-14 12:14:11 -04:00
Gabriel Mazetto abb878326c Rename many path_with_namespace -> full_path 2017-08-01 07:26:58 +02:00
Alexander Randa e0ab5618a0 Wrong data type when testing webhooks 2017-07-20 15:12:06 +00:00
Rémy Coutable 3db37e0562 Enable the Style/TrailingCommaInArguments cop
Use the EnforcedStyleForMultiline: no_comma option.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10 18:25:45 +02:00
Rémy Coutable d40e1f547e Enable the Style/TrailingCommaInLiteral cop
Use the EnforcedStyleForMultiline: no_comma option.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10 18:25:45 +02:00
billy.lb 0de8dccd2a Fix bug when system hook for deploy key 2017-03-16 21:28:34 +08:00
Toon Claes a3fdd6acd2 Use string based `visibility` getter & setter
Add `visibility` & `visibility=` methods to the
`Gitlab::VisibilityLevel` module so the `visibility_level` can be
get/set with a string value.
2017-03-02 12:15:25 +01:00
Douwe Maan 030baf70d2 Enable Performance/RedundantMerge 2017-02-23 09:31:57 -06:00
Robert Speicher 4a191c83d1 Enable Lint/StringConversionInInterpolation cop and autocorrect offenses 2016-10-03 16:09:57 +02:00
Gabriel Mazetto f5a0ac0fc1 Codestyle: make sure we have space around operators 2016-05-13 04:46:56 -03:00
Gabriel Mazetto ee1090e2b2 Added System Hooks for push and tag_push
Code is based on Project Webhooks, removing deprecations and without
commits listing.
2016-04-19 11:00:30 +02:00
Zeger-Jan van de Weg 1e7116b34d Exclude projects pending deletion from all results 2016-03-31 20:20:18 +02:00
Dmitriy Zaporozhets 32a5b741c2
Merge branch 'add_username_to_user_system_hooks' of https://github.com/tbeadle/gitlabhq
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-01-13 10:12:30 +01:00
Tommy Beadle 1f64332e11 Include user_username in user_(add_to/remove_from)_(project/group) system hooks. 2016-01-07 12:54:54 -05:00
Tommy Beadle dada25d447 Include the username in user_create/destroy system hooks. 2016-01-07 12:54:35 -05:00
Tommy Beadle 4d41294d71 Include the user_id in user_*_team system hooks.
This fixes an issue where the user_id is not included in the data for
user_add_to_team and user_remove_from_team system hooks.  The documentation
already states that the user_id should be included.
2016-01-06 11:49:59 -05:00
Steve Norman 79ec7f2897 Added system hooks messages for renaming and transferring a project 2016-01-04 13:48:00 +00:00
Dmitriy Zaporozhets 7f0b4ce16f
Split complex method SystemHooksService#build_event_data
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-13 00:12:18 +01:00
Ricardo Band 42be5ee1cd hooks: Add full project namespace to payload
Payload of "project_member, :create" and "project_member, :destroy" now also
have a field project_path_with_namespace.
2015-10-02 19:44:33 +02:00
bugagazavr acac788902 Added X-GitLab-Event header for web hooks 2015-05-08 16:49:03 +03:00
Valery Sizov bc9ba5237c Revert "Added X-GitLab-Event header for web hooks"
This reverts commit 548f182814.
2015-04-27 16:29:31 +03:00
bugagazavr 548f182814 Added X-GitLab-Event header for web hooks 2015-04-25 21:31:52 +03:00
Nicole Cordes b7a31a4b02 Generate valid json for hooks
It seems that ruby can handle 'nil' value but other json processors
(like PHP) throw an error. This is always generated for empty arrays.
2015-03-10 10:07:25 +01:00
Boyan Tabakov 93bc2d5202 Added support for firing system hooks on group create/destroy and adding/removing users to group.
Added tests and updated docs. Also adding 'user_id' field in the hooks for adding/removing user from team.
2015-01-27 09:25:28 +02:00
Valeriy Sizov c8e78d972a Merge pull request #7495 from polamjag/fix-date-format-on-system-hook
Use xmlschema date format (ISO 8601) on system hooks timestamp
2014-11-05 13:14:26 +02:00
Dmitriy Zaporozhets 13af7de941
Fix migration and association for new members table
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-14 20:38:57 +03:00
Dmitriy Zaporozhets c69b8e0459
Huge replace of old users_project and users_group references
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-14 19:32:51 +03:00
Lukas Erlacher 40fc4261f2 Add system hook for ssh key changes
Add system hook for ssh key create and destroy
Update and fix documentation
Update tests
2014-09-03 01:27:02 +02:00