Commit Graph
712 Commits
Author SHA1 Message Date
Alex Lossent b463975480 Improve invalidation of stored service password if the endpoint URL is changed
It now allows to specify a password at the same time as the new URL, and works
on the service template admin pages.
2015-10-14 15:27:59 +02:00
Stan Hu e0072892e8 Merge branch 'add-wip-to-mr-hook-attrs' into 'master'
merge_request: add work_in_progress to MR hooks



See merge request !1443
2015-10-13 17:12:51 +00:00
Kamil Trzciński e3edd53ae4 Merge branch 'commit_status' into 'master'
Implement Commit Status API

This is preliminary implementation of Commit Status API, pretty much compatible with GitHub.

1. The Commit Statuses are stored in separate table: ci_commit_status.
2. The POST inserts a new row.
3. To POST execute GitLab API `post :id/repository/commits/:sha/status`. This accepts dual authorization:
- Using authorized user
- Using ci-token to allow easy posting from CI Services
4. This adds predefined variable to GitLab CI build environment: CI_BUILD_STATUS_URL, allowing to easy post status from within build (ex. with code coverage or other metrics).
5. This adds statuses to commit's builds view.
6. The commit's status is calculated taking into account status of all builds and all posted statuses.
7. The commit statuses doesn't trigger notifications.
8. The commit status API introduces two new privileges: `read_commit_statuses` and `create_commit_status`.
9. We still miss a few tests and documentation updates for API and CI.

@dzaporozhets @sytses What do you think?




See merge request !1530
2015-10-13 14:33:00 +00:00
Kamil Trzcinski daca1c6511 Fix broken tests 2015-10-12 22:32:29 +02:00
Kamil Trzcinski c61dc13150 Fix some changes 2015-10-12 16:41:36 +02:00
Kamil Trzcinski 2e9c1608e5 Fix commit skipping 2015-10-12 16:35:58 +02:00
Valery Sizov 07f6055272 Invalidate stored service password if the endpoint URL is changed 2015-10-12 13:21:57 +03:00
Kamil Trzcinski 7ef156a242 Add author to statuses 2015-10-12 12:16:55 +02:00
Kamil Trzcinski 914cfbd2f1 Implement Commit Status API 2015-10-12 11:53:49 +02:00
Ben Boeckel 6b73902733 merge_request: add work_in_progress to MR hooks 2015-10-08 16:37:04 -04:00
Dmitriy Zaporozhets 0a8f90a040 Merge remote-tracking branch 'public/project-find-with-namespace-performance'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-08 17:42:14 +02:00
Dmitriy Zaporozhets 69bcef32e1 Merge remote-tracking branch 'public/trending-projects-performance' 2015-10-08 16:22:43 +02:00
Yorick Peterse 03417456f0 Revamp finding projects by namespaces
By using a JOIN we can remove the need for using 2 separate queries to
find a project by its namespace. Combined with an index (only needed for
PostgreSQL) this reduces the query time from ~245 ms (~520 ms for the
first call) down to roughly 10 ms (~15 ms for the first call).
2015-10-08 14:35:32 +02:00
Yorick Peterse 1190d0ab3d Added concern for case-insensitive WHERE queries
On PostgreSQL these queries use LOWER(...) to compare columns and
values. For MySQL a regular WHERE is performed as MySQL is already
case-insensitive.
2015-10-07 23:32:14 +02:00
Dmitriy Zaporozhets 8dcc8e5db6 Fix routing in CI mailer
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-07 10:26:40 +02:00
Yorick Peterse b7abba0ca0 Revamp trending projects query
This changes the query to use a COUNT nested in an INNER JOIN, instead
of a COUNT plus a GROUP BY. There are two reasons for this:

1. Using a COUNT in an INNER JOIN can be quite a bit faster.
2. The use of a GROUP BY means that method calls such as "any?"
   (and everything else that calls "count") operate on a Hash that
   counts the amount of notes on a per project basis, instead of just
   counting the total amount of projects.

The query has been moved into Project.trending as its logic is simple
enough. As a result of this testing the TrendingProjectsFinder class
simply involves testing if the right methods are called, removing the
need for setting up database records.
2015-10-06 17:26:32 +02:00
Kamil Trzcinski 29a7c6796e Fix GitLabCiService and remove ci_yaml_file from CI push data 2015-10-05 16:06:35 +02:00
Kamil Trzcinski c985389722 Add stage tests 2015-10-05 15:59:31 +02:00
Kamil Trzcinski f42078f7c1 Fix rest of tests 2015-10-05 14:31:51 +02:00
Kamil Trzcinski 0367dbf043 Fix build pipelining 2015-10-05 14:15:15 +02:00
Kamil Trzcinski d2d2df0738 Fix next round of tests 2015-10-05 13:12:00 +02:00
Kamil Trzcinski 317a746954 Make commit_spec run 2015-10-05 12:02:26 +02:00
Guilherme Garnier 1cfb48ddd0 Merge remote-tracking branch 'upstream/master' 2015-10-03 11:46:29 -05:00
Guilherme Garnier 848d7b2a2b Fix rubocop warnings in spec/models 2015-10-03 01:48:54 -05:00
Dmitriy Zaporozhets 0e7b96bf48 Merge branch 'access_level_badge_bug' into 'master'
Fix: Wrong access level badge on MR comments

https://gitlab.com/gitlab-org/gitlab-ce/issues/2654

See merge request !1501
2015-10-02 14:39:58 +00:00
Douwe Maan 93522e59ec Merge branch 'rs-throttle-reset' into 'master'
Throttle "Forgot your password?" emails

Addresses internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2611

See merge request !1476
2015-10-02 14:37:07 +00:00
Valery Sizov 97e6c9b42c Wrong access level badge on MR comments 2015-10-02 15:11:17 +03:00
Dmitriy Zaporozhets 3515cb9b2d Fix tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-02 11:02:05 +02:00
Dmitriy Zaporozhets 5de0b07844 Prevent creating 2 Ci::Project entities when enable CI
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-02 10:08:16 +02:00
Robert Speicher d40dd5cfe3 Conform to spec guidelines that only exist in my head
[ci skip]
2015-10-02 00:14:47 -04:00
Robert Speicher ad7ad8745a Add User#recently_sent_password_reset? 2015-10-01 21:41:56 -04:00
Douwe Maan 96c2e22549 Merge branch 'disable-report-button-if-already-reported' into 'master'
Disable the "Report abuse" button if a user has already been reported

Hello,

I've implemented the feature request #2330. Here is what it looks like:

![report-abuse-button-disabled](https://gitlab.com/rymai/gitlab-ce/uploads/420d51906eac1c40c50701a0a340474f/report-abuse-button-disabled.png)

I hope that's an acceptable solution.

cc @DouweM

See merge request !1456
2015-10-01 13:17:18 +00:00
Kamil Trzciński 114853063b Merge branch 'ci-fixes' into 'master'
CI: Fix clone url and fix project token removal

- Fixes broken CI clone url on dev.gitlab.org
- Fixes regression in CI token removal

/cc @vsizov @dzaporozhets 



See merge request !1481
2015-10-01 12:59:39 +00:00
Douwe Maan 41b08e4a08 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-10-01 12:34:32 +02:00
Douwe Maan 7c7b664c01 Merge branch 'master' into flevour/gitlab-ce-project-path-insensitive-lookup 2015-10-01 12:33:51 +02:00
Kamil Trzcinski 0e54847339 Fix: CI token removal regression from build trace 2015-10-01 11:43:06 +02:00
Kamil Trzcinski b9ccc79cb5 Delegate ci_project parameters to projects
- It delegates name, path, gitlab_url, ssh_url_to_repo
- Remove ability to set this parameters using CI API

This fixes GitLab project rename, namespace change, repository rename, etc.
2015-09-30 12:48:40 +02:00
Rémy Coutable ea72d53ec0 Streamline the "Report button"
This simplifies the "Report button" to not use open a dropdown and
adds a tooltip on this button.
This also removes an extra spec and adds missing specs.
2015-09-29 21:47:01 +02:00
Rémy Coutable 5f95a5e070 Disable the "Report abuse" button if a user has already been reported 2015-09-29 21:11:51 +02:00
Kamil Trzcinski 0d877d91e7 Make ensure_gitlab_ci_project return ci_project or create a new one 2015-09-29 10:47:04 +02:00
Kamil Trzcinski 0f3deac362 Fix tests 2015-09-29 10:47:04 +02:00
Kamil Trzcinski 0fa4ab5fd8 Rename commits to ci_commits 2015-09-29 10:47:04 +02:00
Kamil Trzcinski 8f8efcfa00 Fix tests 2015-09-29 10:47:03 +02:00
Kamil Trzcinski 0e33814708 Fix tests 2015-09-29 10:47:03 +02:00
Kamil Trzcinski 30c78e70cb WIP 2015-09-29 10:47:03 +02:00
Dmitriy Zaporozhets fd39414408 Merge branch 'remove-routes-helper' into 'master'
Fix Slack notification URL and remove the usage of Ci::RoutesHelper

Fix for #2644

/cc @dzaporozhets @rspeicher 

See merge request !1391
2015-09-24 09:53:04 +00:00
Dmitriy Zaporozhets 2eb9a20f36 Enable CI for gitlab when .gitlab-ci.yml is pushed
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-09-23 13:11:40 +02:00
Dmitriy Zaporozhets 21dfaa000d Show CI status on all pages where commits list is rendered
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-09-23 12:23:04 +02:00
Kamil Trzcinski a42f418f18 Fix GitlabCiService specs 2015-09-22 18:28:08 +02:00
Robert Speicher 2f88459297 Ensure raise_error expectations provide arguments 2015-09-21 15:35:29 -04:00