Commit Graph

2516 Commits

Author SHA1 Message Date
Douwe Maan 43d1188031 Merge branch 'fix-api-mr-notes-ordering' into 'master'
Return comments in created order in merge request API

Closes #1832

See merge request !985
2015-07-28 09:15:08 +00:00
Valery Sizov 4a8076a35f Merge branch 'rake-update-commit-count' into 'master'
Add rake task 'gitlab:update_commit_count'

Starting with migration `20150717130904` commit count is stored in the
database. For existing projects it defaults to `0` and is updated to the
correct value when commits are pushed.

The newly introduced rake task updates the commit count for all projects
which have not been updated yet.

![gitlab-rake-update-commit-count](https://gitlab.com/gitlab-org/gitlab-ce/uploads/4785009e0f3fc4c3199fe65dfb8e60e0/gitlab-rake-update-commit-count.png)

Refs !986, !989, #2040, #2089.

See merge request !1040
2015-07-27 08:06:42 +00:00
Stan Hu 71a8c780ff Merge branch 'master' of github.com:gitlabhq/gitlabhq 2015-07-24 14:39:04 -07:00
Daniel Gerhardt d3cae9278f Add rake task 'gitlab:update_commit_count'
Starting with migration `20150717130904` commit count is stored in the
database. For existing projects it defaults to `0` and is updated to the
correct value when commits are pushed.

The newly introduced rake task updates the commit count for all projects
which have not been updated yet.

Refs !986, !989, #2040.
2015-07-24 16:20:28 +02:00
Valery Sizov 70de5114fb Merge branch 'auth-icons-labels' into 'master'
Allow custom label to be set for authentication providers.

Addresses internal issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2341

Beside the above, I've:
- Refactored `OauthHelper` to have clearer method names and behaviour
- Moved some of `OauthHelper` behaviour to `Gitlab::OAuth::Provider`
- Renamed `OauthHelper` to `AuthHelper` since LDAP, SAML, Kerberos aren't OAuth
- Updated the icons for GitHub and GitLab

In the examples below, "OurAuth" is a SAML provider with a custom label.

![Screen_Shot_2015-07-02_at_16.29.52](https://gitlab.com/gitlab-org/gitlab-ce/uploads/7d425bde69dc34e1667ebd5375d0266d/Screen_Shot_2015-07-02_at_16.29.52.png)

![Screen_Shot_2015-07-02_at_16.31.40](https://gitlab.com/gitlab-org/gitlab-ce/uploads/cbb273321ecdf4cab3d3ef0dc35553e7/Screen_Shot_2015-07-02_at_16.31.40.png)

![Screen_Shot_2015-07-02_at_16.32.39](https://gitlab.com/gitlab-org/gitlab-ce/uploads/d8dd6e1d0dc45a788e869cdcdc99e178/Screen_Shot_2015-07-02_at_16.32.39.png)

![Screen_Shot_2015-07-02_at_16.33.18](https://gitlab.com/gitlab-org/gitlab-ce/uploads/7dbfe8b0ae229c32a08d6c7442976d83/Screen_Shot_2015-07-02_at_16.33.18.png)


See merge request !927
2015-07-24 11:28:55 +00:00
Douwe Maan b7be08c515 Merge branch 'changes_for_gmail_inbox_actions' into 'master'
Changes for gmail inbox actions

Related to the ongoing efforts to get Gmail inbox actions for GitLab.com in #1517

Not using `mdash` would break the rendering of the html email by switching `Content-Transfer-Encoding` to `quoted-printable` for every email.

Removed the rake task and docs to prevent users from sending dummy emails which might cause application rejection.

See merge request !1024
2015-07-23 14:35:31 +00:00
Douwe Maan 70a3c165a9 Allow custom label to be set for authentication providers. 2015-07-23 15:20:12 +02:00
ngentile dbff6bc106 Gitlab Issue 707: Indent unfolded code 1 character 2015-07-22 09:58:17 -04:00
Douwe Maan 276ca427ea Fix Remove source-branch for MRs from same project 2015-07-22 14:07:41 +02:00
Marin Jankovski ca451365ab Remove docs and rake task for gmail actions to prevent problems with registration. 2015-07-22 11:46:08 +02:00
Jacob Vosmaer 346b074979 Don't stop if database.sql.gz already exists
The existing behavior of the backups is to overwrite whatever data
was still there in the scratch directories. This broke when we added
a 'gzip' step because 'gzip database.sql' will fail if 'database.sql.gz'
already exists. Doing 'rm -f database.sql.gz' before the 'gzip'
avoids this failure.
2015-07-21 10:37:27 +02:00
Stan Hu e8c147903b Merge branch 'gc-images-no-casing' into 'master'
GoogleCode importer: Do not care about casing of image file extensions

When a GoogleCode repository contains an attached image with an UPPERCASE file extension, it's not inlined.

/CC @DouweM

See merge request !1003
2015-07-20 16:42:52 +00:00
Jacob Vosmaer 83304bf410 Merge pull request #9400 from tuxillo/patch-1
Use whoami instead of $USER
2015-07-20 11:45:34 +02:00
Sven Strickroth 5eeab9f0a6 GoogleCode importer: Do not care about casing of image file extensions
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2015-07-20 00:53:43 +02:00
Dmitriy Zaporozhets f0116f1335
Store commit count in project table
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-17 15:22:56 +02:00
Dmitriy Zaporozhets 67ca5a53f6
Build missing cache items in background job after each push
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-17 14:50:03 +02:00
Stan Hu 6c9f527b3f Return comments in created order in merge request API
Closes #1832
2015-07-16 22:33:58 -07:00
Stan Hu daed441dfe Merge branch 'merge-request-wip-information' into 'master'
api: expose work_in_progress flag

See merge request !948
2015-07-15 01:13:05 +00:00
Douwe Maan b93053695a Fix transferring of project to another group using the API. 2015-07-11 16:47:33 -04:00
Ben Boeckel 414cacd7f4 api: expose work_in_progress flag 2015-07-10 10:33:43 -04:00
Dmitriy Zaporozhets bda04bc687 Merge branch 'fork_visibility_level' into 'master'
Forks should not have more permissive visibility levels than the original

https://dev.gitlab.org/gitlab/gitlabhq/issues/2286

See merge request !936
2015-07-10 12:05:54 +00:00
Stan Hu 4c586dc7c2 Revert "api: add 'system', 'upvote', and 'downvote' fields to note queries"
This reverts commit dd4fee5fdb.
2015-07-09 12:35:53 -07:00
Ben Boeckel dd4fee5fdb api: add 'system', 'upvote', and 'downvote' fields to note queries 2015-07-09 11:24:28 -04:00
Dmitriy Zaporozhets 1bf3e1578a
Properly render plain readme
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-09 11:36:09 +02:00
Francesco Coda Zabetta 6d56bd8690 use teaspoon instead of jasmine for testing javascript 2015-07-08 17:46:51 +02:00
Dmitriy Zaporozhets b9452d7bcd Merge branch 'improve-postgres-restore-cleaning' into 'master'
Use native Postgres database cleaning during backup restore

We were using hacks to drop tables etc during a Postgres backup
restore. With this change, we let pg_dump insert the DROP TABLE
statements it needs at the start of the SQL dump.

See merge request !1891
2015-07-07 23:02:48 +00:00
Jacob Vosmaer 90ab5a59bb Use native Postgres database cleaning during backup restore
We were using hacks to drop tables etc during a Postgres backup
restore. With this change, we let pg_dump insert the DROP TABLE
statements it needs at the start of the SQL dump.
2015-07-07 15:34:06 +02:00
Kamil Trzciński 474d798c42 Merge branch 'compress-db' into 'master'
Compress database backup

Restore handles both cases: uncompressed and compressed backup. As an improvement `IO.popen` can be used.

/cc @jacobvosmaer

See merge request !873
2015-07-07 10:58:27 +00:00
Dmitriy Zaporozhets f76092c06d Merge branch 'settings-via-api' into 'master'
API to set application settings for admin

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

See merge request !934
2015-07-07 10:57:41 +00:00
Kamil Trzcinski 69c659ebd3 Compress database backup 2015-07-06 17:14:17 +02:00
Dmitriy Zaporozhets 603ceea21a
Add tests and improve logic
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-06 16:47:19 +02:00
Valery Sizov 111ebe5471 Fork visibility level fix 2015-07-06 17:40:33 +03:00
Dmitriy Zaporozhets b28714b6a9
Add docs and empty specs for applicaiton settings API
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-06 15:53:08 +02:00
Dmitriy Zaporozhets b2e2444436 Merge pull request #9430 from gitlabhq/fix-rake-test-ci
Use teaspoon instead of jasmine:ci
2015-07-06 15:50:37 +02:00
Dmitriy Zaporozhets c2ee6862c8
API to set application settings for admin
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-03 16:50:21 +02:00
Steve Norman b3a751112d Allow user to be blocked and unblocked via the API 2015-07-03 11:17:57 +00:00
Dmitriy Zaporozhets 18ef9befc0
Use teaspoon instead of jasmine:ci
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-03 10:51:44 +02:00
Stan Hu 9add3e6eb5 Extract the longest-matching ref from a commit path when multiple matches occur
Closes #1839
2015-07-01 07:01:59 -07:00
Kamil Trzcinski a34c61d9c6 Reuse HTML Pipeline object in Markdown parser
The patches reduces pressure on GC and reduces markdown processing time
2015-06-30 13:59:27 +02:00
Stan Hu e3dbaa7027 Merge branch '1791-fix-github-issue-order' into 'master'
Fix wrong order of issues when importing from github

### 1. What does this MR do?

The order of issues imported from GitHub is fixed.

### 2. Are there points in the code the reviewer needs to double check?

Nothing.

### 3. Why was this MR needed?

The default behaviors of GitHub API at listing issues are sort: :created and direction: :desc.

See GitHub API details at https://developer.github.com/v3/issues/#list-issues.

### 4. What are the relevant issue numbers / Feature requests?

Fixes #1791

### 5. Screenshots (if relevant)

Nothing

See merge request !898
2015-06-29 14:15:47 +00:00
Robert Speicher 60c7d35543 Remove jasmine:ci task, execute teaspoon directly on CI 2015-06-28 16:27:40 -04:00
Hiroyuki Sato 4a203aab57 Fix wrong order of issues when importing from github
See API details at https://developer.github.com/v3/issues/.
Refs #1791
2015-06-28 04:02:21 +09:00
Dmitriy Zaporozhets 9f166a8649 Merge branch 'rename-abilities' into 'master'
Rename abilities to correspond contoller/model action names

write_ was renamed to create_
modify_  was renamed to update_

So now in update action we have next code

```
def create
  can?(current_user, :create_issue, @issue)
end

def update
  can?(current_user, :update_issue, @issue)
end
```

See merge request !896
2015-06-26 16:39:17 +00:00
Dmitriy Zaporozhets 58ceb8e950
Only people who can manage issue can assign labels to it
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-26 16:02:57 +02:00
Dmitriy Zaporozhets 342d553709
Rename abilities to correspond contoller/model action names
write_ was renamed to create_
modify_  was renamed to update_

So now in update action we have next code

def create
  can?(current_user, :create_issue, @issue)
end

def update
  can?(current_user, :update_issue, @issue)
end

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-26 15:55:56 +02:00
Stan Hu 6548e9b48c Add 2FA status to user admin API
Closes https://github.com/gitlabhq/gitlabhq/issues/9391
2015-06-23 22:41:59 -07:00
Dmitriy Zaporozhets b902a9b83d Merge branch 'split-tests' into 'master'
Split rspec and spinach tests in parallel

For https://dev.gitlab.org/gitlab/gitlabhq/issues/2386

See merge request !874
2015-06-23 15:17:11 +00:00
Dmitriy Zaporozhets 541f7675f9 Merge branch 'fix-diff-patch-public-mr' into 'master'
Fix downloading of patches on public merge requests when user logged out

### What does this MR do?

This MR makes it possible to download a diff patch on a public merge request when a user is logged out.

### Why was this MR needed?

An Error 500 would result when a user attempted to click on the "Email Patches" or "Plain Diff" button:

```
NoMethodError - undefined method `id' for nil:NilClass:
  lib/gitlab/backend/shell_env.rb:9:in `set_env'
  lib/gitlab/satellite/action.rb:20:in `in_locked_and_timed_satellite'
  lib/gitlab/satellite/merge_action.rb:49:in `diff_in_satellite'
  app/models/merge_request.rb:219:in `to_diff'
  app/controllers/projects/merge_requests_controller.rb:42:in `block (2 levels) in show'
```

### What are the relevant issue numbers?

* Closes #1225
* Closes #1854 (dup)
* Closes #1858 (dup)

See merge request !872
2015-06-23 15:03:00 +00:00
Dmitriy Zaporozhets b8f12d1917 Replace GITLAB with GitLab in rake task descriptions 2015-06-23 16:52:40 +02:00
Dmitriy Zaporozhets 12e0998635 Refactor rake tasks for tests 2015-06-23 16:48:52 +02:00