Commit Graph

40 Commits

Author SHA1 Message Date
Duana Saskia ece6a1ea6e Filter project hooks by branch
Allow specificying a branch filter for a project hook and only trigger
a project hook if either the branch filter is blank or the branch matches.
Only supported for push_events for now.
2018-08-13 13:20:58 +02:00
Mark Chao a63bce1a4b Resolve "Rename the `Master` role to `Maintainer`" Backend 2018-07-11 14:36:08 +00:00
Douwe Maan 52967b107b
Merge branch 'jej/mattermost-notification-confidentiality-10-6' into 'security-10-6'
[10.6] Prevent notes on confidential issues from being sent to chat

See merge request gitlab/gitlabhq!2366
# Conflicts:
#	app/helpers/services_helper.rb
2018-04-05 08:41:56 +02:00
Jean-Baptiste Guerraz 20844326f3 align "confidential issues events" implementation with "issues events" one 2018-03-01 10:51:56 +01:00
blackst0ne 27c95364b5 Replace '.team << [user, role]' with 'add_role(user)' in specs 2017-12-22 19:18:28 +11:00
Jacopo 2f40dac352 Refactor `have_http_status` into `have_gitlab_http_status` in the specs 2017-10-20 10:13:18 +02:00
Robert Schilling 915dd57fe2 Add tests for the unmodified header 2017-08-28 17:10:34 +02:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Douwe Maan 1fd83f972c Merge branch 'bvl-rename-build-events-to-job-events' into 'master'
Rename `build_events` to `job_events`

Closes #31620

See merge request !11287
2017-05-16 14:12:19 +02:00
Douwe Maan 950fa32a7c Revert "Merge branch 'bvl-rename-build-events-to-job-events' into 'master'"
This reverts merge request !11287
2017-05-15 20:24:19 +00:00
Bob Van Landuyt cac7e03fa1 Rename `build_events` to `job_events` in code 2017-05-15 14:27:01 +02:00
Jacopo ff76adb547 Unnecessary "include WaitForAjax" and "include ApiHelpers"
Removed all the unnecessary include of `WaitForAjax` and `ApiHelpers` in the specs.
Removed unnecessary usage of `api:true`
2017-04-21 22:32:02 +02:00
Z.J. van de Weg e415ad3952 Fix API not accepting job_events for webhooks
When renaming, the argument on the projects hook API was forgotten. Now
one could successfully set it again.

The fix is a little ugly stylewise, but needed as the underlying model
still refers to it as build_events. This commit is to fix it, later we
should migrate the data to a new column. The edit on the spec file makes
sure it passes now, and will fail when we migrate the column.
2017-04-12 10:06:57 +02:00
Toon Claes 9e942b5972 Fix all tests
This commit was about 6 commits before squashing, with the main goal to
make all tests green. Now, after pushing this commit we'll see what the
CI has to say about that.
2017-03-06 14:34:07 +01:00
Robert Schilling 86c58687b2 Return 204 for delete endpoints 2017-02-28 08:32:38 +01:00
Robert Schilling c70dfbc686 Add a custom pagination matcher 2017-02-16 15:38:40 +01:00
Rémy Coutable 9c560b5cdf
Replace many :project with :empty_projects in API specs
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-17 11:41:27 -05:00
Robert Schilling 2448fa69d6 Fix project hooks params 2017-01-03 21:07:12 +01:00
Livier eb4f15571d Changed API spec files to describe the correct class
Restore changes for api spec files

Fix error in rspec Users

Delete extra space Repositories-spec
2016-11-28 10:55:27 -07:00
Sean McGivern f77be11cb9 Ensure hook tokens are write-only in the API 2016-11-01 11:40:06 +00:00
Gauvain Pocentek c85c146aa2 Add support for token attr in project hooks API
The UI allows to define a token to validate payload on the target URL,
this patch adds the feature to the API.
2016-11-01 10:41:39 +00:00
Dmitriy Zaporozhets 137ebcfb3c Replace undefined Grape routing code from 400 to 404
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-10-10 16:32:32 +03:00
Dmitriy Zaporozhets fdfc93679d Fix API specs behaviour for invalid routing
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-10-10 16:32:32 +03:00
Ben Boeckel 99c2f3b3c5 api: expose wiki_page_events project hook field in the API 2016-08-24 10:33:51 -04:00
Ben Boeckel f413d7ed80 docs: document other project webhook fields 2016-08-24 10:33:37 -04:00
Lin Jen-Shin 9fdcbcb0de Have trait all_events_enabled so that's easier to reuse, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13823349
2016-08-12 16:48:47 +08:00
Lin Jen-Shin 0b52517049 Merge remote-tracking branch 'upstream/master' into pipeline-hooks-without-slack
* upstream/master: (233 commits)
  Fix awardable button mutuality loading spinners
  Update CHANGELOG for 8.10.5
  Clean up project destruction
  Small refactor of doc/development/README.md
  Avoid commit lookup on diff_helper
  Removed extra newline from redis_spec.rb
  Used cached value of project count to reduce DB load
  Remove duplicate link_to statements
  Mention add_column_with_default in downtime guide
  Add missing space to generic badge template
  Rename `run` task helper method to prevent conflict with StateMachine
  Add a method in Project to return a cached value of total count of projects
  spellcheck
  Add svg guidelines to ui guide
  Add Changelog entry for Grape upgrade [ci skip]
  Fix Grape tests.
  Retain old behavior
  Update Grape from 0.13.0 to 0.15.0.
  adds second batch of tests changed to active tense
  fixes part1 of files to start using active tense
  ...
2016-08-11 13:35:35 +08:00
tiagonbotelho 1d268a89de adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
Lin Jen-Shin 020ea32e76 Implement pipeline hooks, extracted from !5525
Closes #20115
2016-08-02 18:22:24 +08:00
Z.J. van de Weg abca19da8b Use HTTP matchers if possible 2016-06-27 20:10:42 +02:00
Stan Hu 9413dd80f5 Prevent users from deleting Webhooks via API they do not own
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15576
2016-04-24 23:53:59 -07:00
Kamil Trzcinski 2988e1fbf5 Migrate CI::Services and CI::WebHooks to Services and WebHooks 2015-12-10 16:04:08 +01:00
Ben Boeckel 869bab9d68 hooks: improve tests for hook API 2015-09-24 16:59:16 -04:00
Robert Speicher 15a05be70d Fix Style/Blocks cop violations 2015-06-22 16:00:54 -04:00
Jeroen van Baarsen 0c4a70a306 Updated rspec to rspec 3.x syntax
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-02-12 19:17:35 +01:00
Dmitriy Zaporozhets 2d87556847 Remove rails observers from application 2014-06-17 22:51:43 +03:00
Jeroen van Baarsen 5dd2f36ae1 Added API testing group 2014-04-11 21:45:56 +02:00
Dmitriy Zaporozhets c227aa44f9
Make changes to tests
* project_with_code -> project
* project -> ermpty_project

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-01-22 21:03:52 +02:00
Dmitriy Zaporozhets 21f4e5d3ac ProjectHook API supports new event fields
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-12-04 13:37:39 +02:00
Dmitriy Zaporozhets 822dac87ec Extract tests for project hooks API
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-12-04 13:37:39 +02:00