Commit Graph
2131 Commits
Author SHA1 Message Date
Robert Speicher d453b24aca Merge branch 'validate-readme-format' into 'master'
Validate README format

Take the first previewable README file as project's README, otherwise if
none file is available, or we can't preview any of them, we assume that
project doesn't have a README file.

Fixes #3978
2016-01-05 17:03:24 -05:00
Robert Speicher 045e8cc38c Update version check images to use SVG 2016-01-05 14:35:29 -05:00
Douwe Maan 07c39c9976 Merge branch 'brunsa2/gitlab-ce-diverging-branch-graphs' into 'master'
Add graphs of commits ahead/behind default branch (by @brunsa2)

Replaces https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/1716

See merge request !2301
2016-01-05 15:44:22 +00:00
Douwe Maan 7c3c901ada Merge branch 'joshfng/gitlab-ce-fix-3802' into 'master'
Show 'New Merge Request' buttons on canonical repo. (by @joshfng)

Replaces https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2189 to run tests on our runners.

See merge request !2300
2016-01-05 15:12:35 +00:00
Douglas Barbosa Alexandre 8e33ec1dee [ci skip] Update CHANGELOG 2016-01-05 11:30:30 -02:00
Dmitriy Zaporozhets aa3c7219e3 Merge branch 'fix-api-lookup-with-usernames-with-dots' of https://gitlab.com/stanhu/gitlab-ce 2016-01-05 10:43:29 +01:00
Stan Hu 93096247d8 Don't notify users twice if they are both project watchers and subscribers
Closes #4708
2016-01-04 15:01:52 -08:00
Robert Speicher 6f4ea679d9 Merge branch 'show-all-builds-by-default' into 'master'
Show all builds by default in the builds page

Fixes #4240 

See merge request !2243
2016-01-04 18:42:37 +00:00
Robert Speicher 10a9751ace Update CHANGELOG
[ci skip]
2016-01-04 13:41:43 -05:00
Steve Norman 79ec7f2897 Added system hooks messages for renaming and transferring a project 2016-01-04 13:48:00 +00:00
Douglas Barbosa Alexandre 567dc62b6d Show 'All' tab by default in the builds page 2016-01-04 10:21:10 -02:00
Dmitriy Zaporozhets f8696018cc Merge branch 'expire-cache-on-app-settings-change' into 'master'
Expire view caches when application settings change

If the admin disables Gravatar, for example, before the views would not invalidate. Now they invalidate automatically when this happens.

Closes #5728

See merge request !2280
2016-01-04 09:41:28 +00:00
Josh FryeandJosh Frye 8bfc46451e Show 'New Merge Request' buttons on canonical repo. 2016-01-03 18:12:27 -05:00
Stan Hu 086cfc8685 Fix API project lookups when querying with a namespace with dots
Attempting to use the /projects/:id API by specifying :id in
"namespace/project" format would always result in a 404 if the namespace
contained a dot.

The reason? From http://guides.rubyonrails.org/routing.html#specifying-constraints:

"By default the :id parameter doesn't accept dots - this is because the dot is
used as a separator for formatted routes. If you need to use a dot within an
:id add a constraint which overrides this - for example id: /[^\/]+/ allows
anything except a slash."

Closes https://github.com/gitlabhq/gitlabhq/issues/9573
2016-01-03 15:08:44 -08:00
Stan Hu 2802d4992d Expire view caches when application settings change
Closes #5728
2016-01-03 11:20:14 -08:00
Robert Speicher 9a9a81bea0 Don't attempt to set Referrer policy in Safari
While Safari supports the policy, it does not (currently, as of 9.x)
recognize `origin-when-cross-origin` as a valid value, so we omit the
policy entirely under Safari.

Closes #5609
2015-12-31 20:44:55 -05:00
Robert Speicher d33cc4e530 Update CHANGELOG
[ci skip]
2015-12-31 14:21:31 -05:00
Robert Speicher 00dc5f1b3e Update CHANGELOG
[ci skip]
2015-12-30 18:22:59 -05:00
Zeger-Jan van de WegandRobert Speicher 1be406d741 Swap Author and Assignee Selectors on issuable index view
Closes #4039
2015-12-30 18:21:53 -05:00
Robert Speicher 5c6b9e8c57 Update CHANGELOG
[ci skip]
2015-12-30 16:51:47 -05:00
Stan Hu 59533d47dd Fix project transfer e-mail sending incorrect paths in e-mail notification
The introduction of ActiveJob and `deliver_now` in 7f214cee7 caused a race
condition where the mailer would be invoked before the project was committed
to the database, causing the transfer e-mail notification to show the old
path instead of the new one.

Closes #4670
2015-12-29 13:49:44 -08:00
Robert Speicher a80f2b792c Update CHANGELOG
[ci skip]
2015-12-29 16:29:45 -05:00
Dmitriy Zaporozhets 08b4d8b6ac Merge branch 'disable-git-follow' into 'master'
Disable --follow in `git log` to avoid loading duplicate commit data in infinite scroll

`git` doesn't work properly when `--follow` and `--skip` are specified together. We could even be **omitting commits in the Web log** as a result.

Here are the gory details. Let's say you ran:

```
git log -n=5 --skip=2 README
```

This is the working case since it omits `--follow`. This is what happens:

1. `git` starts at `HEAD` and traverses down the tree until it finds the top-most commit relevant to README.
2. Once this is found, this commit is returned via `get_revision_1()`.
3. If the `skip_count` is positive, decrement and repeat step 2. Otherwise go onto step 4.
4. `show_log()` gets called with that commit.
5. Repeat step 1 until we have all five entries.

That's exactly what we want. What happens when you use `--follow`? You have to understand how step 1 is performed:

* When you specify a pathspec on the command-line (e.g. README), a flag `prune` [gets set here](https://github.com/git/git/blob/master/revision.c#L2351).
* If the `prune` flag is active, `get_commit_action()` determines whether the commit should be [scanned for matching paths](https://github.com/git/git/blob/master/revision.c#L2989).
* In the case of `--follow`, however, `prune` is [disabled here](https://github.com/git/git/blob/master/revision.c#L2350).
* As a result, a commit is never scanned for matching paths and therefore never pruned. `HEAD` will always get returned as the first commit, even if it's not relevant to the README.
* Making matters worse, the `--skip` in the example above would actually skip a every other entry after `HEAD` N times. If README were changed in these skipped commits, we would actually miss information!

Since git uses a matching algorithm to determine whether a file was renamed, I
believe `git` needs to generate a diff of each commit to do this and traverse
each commit one-by-one to do this. I think that's the rationale for disabling
the `prune` functionality since you can't just do a simple string comparison.

Closes #4181, #4229, #3574, #2410

See merge request !2210
2015-12-28 12:05:55 +00:00
Dmitriy Zaporozhets 202010e33f Merge branch 'add-recaptcha-support' into 'master'
Add support for Google reCAPTCHA in user registration to prevent spammers

To do:

- [x] Failing reCAPTCHA test causes all the fields to be lost
- ~~[ ] Improve styling of reCAPTCHA box~~ (not possible)
- ~~[ ] Put settings in `application_settings` (?)~~

![image](/uploads/d38ca89820d3c0066fb8aeb645fd77f0/image.png)

![image](/uploads/6b050749963691b023d076682abcf736/image.png)

Page when you fail CAPTCHA:

![image](/uploads/bc4846f0a5144985bc41dfa75eeab4c1/image.png)


See merge request !2216
2015-12-28 11:55:21 +00:00
Robert Speicher a97a2d2720 Merge branch 'mention-all' into 'master'
Only allow group/project members to mention `@all`

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/3473

See merge request !2205
2015-12-27 21:09:16 +00:00
Stan Hu 9f7d379c2a Add support for Google reCAPTCHA in user registration to prevent spammers 2015-12-27 09:04:11 -08:00
Valery SizovandValery Sizov a1b63e1252 revert back vote buttons to issue and MR pages 2015-12-25 14:11:19 +02:00
Dmitriy Zaporozhets 92bc703847 Merge branch 'support-api-lookup-by-username' into 'master'
Add API support for looking up a user by username

Needed to support Huboard

See merge request !2089
2015-12-25 11:23:29 +00:00
Stan Hu ff8cd116a0 Disable --follow in git log to avoid loading duplicate commit data in infinite scroll
`git` doesn't work properly when `--follow` and `--skip` are specified together. We could even be **omitting commits in the Web log** as a result.

Here are the gory details. Let's say you ran:

```
git log -n=5 --skip=2 README
```

This is the working case since it omits `--follow`. This is what happens:

1. `git` starts at `HEAD` and traverses down the tree until it finds the top-most commit relevant to README.
2. Once this is found, this commit is returned via `get_revision_1()`.
3. If the `skip_count` is positive, decrement and repeat step 2. Otherwise go onto step 4.
4. `show_log()` gets called with that commit.
5. Repeat step 1 until we have all five entries.

That's exactly what we want. What happens when you use `--follow`? You have to understand how step 1 is performed:

* When you specify a pathspec on the command-line (e.g. README), a flag `prune` [gets set here](https://github.com/git/git/blob/master/revision.c#L2351).
* If the `prune` flag is active, `get_commit_action()` determines whether the commit should be [scanned for matching paths](https://github.com/git/git/blob/master/revision.c#L2989).
* In the case of `--follow`, however, `prune` is [disabled here](https://github.com/git/git/blob/master/revision.c#L2350).
* As a result, a commit is never scanned for matching paths and therefore never pruned. `HEAD` will always get returned as the first commit, even if it's not relevant to the README.
* Making matters worse, the `--skip` in the example above would actually skip every other after `HEAD` N times. If README were changed in these skipped commits, we would actually miss information!

Since git uses a matching algorithm to determine whether a file was renamed, I
believe `git` needs to generate a diff of each commit to do this and traverse
each commit one-by-one to do this. I think that's the rationale for disabling
the `prune` functionality since you can't just do a simple string comparison.

Closes #4181, #4229, #3574, #2410
2015-12-25 01:28:33 -08:00
Gabriel Mazetto 6e3fb5024a Updated CHANGELOG 2015-12-24 19:01:30 -02:00
Douwe Maan 7b25da74ea Merge branch 'fix-add-key-submit' into 'master'
Enable "Add key" button when user fills in a proper key

Closes #4295

See merge request !2208
2015-12-24 20:28:34 +00:00
Stan Hu 8309ef45a9 Enable "Add key" button when user fills in a proper key
Closes #4295
2015-12-24 11:34:32 -08:00
Douwe Maan 43a3a401bd Merge branch 'master' into mention-all 2015-12-24 20:34:19 +01:00
Robert Speicher e3befaed82 Update CHANGELOG
[ci skip]
2015-12-24 14:14:03 -05:00
Robert Speicher a9b82220e8 Merge branch 'fix-changelog' into 'master'
Move changelog items to their correct place.

Fixes #4236

See merge request !2201
2015-12-24 13:59:02 -05:00
Valery Sizov e1a47bd123 Merge branch 'emoji_picker_frequently_used' into 'master'
Emoji picker: add "frequently used" category

depend on !2172

![Screen_Shot_2015-12-24_at_16.39.04](/uploads/7117173c6f519282054bcb1b7ba248f4/Screen_Shot_2015-12-24_at_16.39.04.png)


See merge request !2180
2015-12-24 15:58:32 +00:00
Stan Hu 5a8c65b508 Add API support for looking up a user by username
Needed to support Huboard
2015-12-24 07:57:13 -08:00
Valery Sizov 355e62eb49 added default for frequently used emojis 2015-12-24 16:40:10 +02:00
Douwe Maan 672cbbff95 Only allow group/project members to mention @all 2015-12-24 15:33:51 +01:00
Valery Sizov d84ca3e815 Merge branch 'emoji-picker-search' into 'master'
Emoji picker search

depend on !2172

Issue https://gitlab.com/gitlab-org/gitlab-ce/issues/3576

!!! Should be merged after https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2198

![Screenshot_2015-12-23_11.44.57](/uploads/01da0b62c3c234307142e2c4db68e53f/Screenshot_2015-12-23_11.44.57.png)

See merge request !2186
2015-12-24 13:58:49 +00:00
Dmitriy Zaporozhets 1f9633d67c Merge branch 'fix-milestones-with-slashes' into 'master'
Fix Error 500 when global milestones have slashes

* Closes #4226

* Closes https://github.com/gitlabhq/gitlabhq/issues/9921

See merge request !2182
2015-12-24 13:04:43 +00:00
Douwe Maan 7309b848e2 Move changelog items to their correct place. 2015-12-24 12:20:00 +00:00
Valery Sizov 999a374f77 Merge branch 'emoji-picker-search'into emoji_picker_frequently_used 2015-12-24 13:38:17 +02:00
Valery Sizov d4e9c75844 Merge remote-tracking branch 'origin/master' into emoji-picker-search 2015-12-24 12:01:22 +02:00
Dmitriy Zaporozhets c75ac8218e Merge branch 'fix-error-500-global-search-issues' into 'master'
Fix Error 500 when doing a search in dashboard before visiting any project

If a search turned up an issue, under certain conditions you would see this error:

```
ActionView::Template::Error (undefined method `path_with_namespace' for nil:NilClass):
     6:   - if issue.description.present?
     7:     .description.term
     8:       = preserve do
     9:         = search_md_sanitize(markdown(issue.description))
    10:   %span.light
    11:     #{issue.project.name_with_namespace}
    12:   - if issue.closed?
  lib/gitlab/markdown/upload_link_filter.rb:36:in `build_url'
  lib/gitlab/markdown/upload_link_filter.rb:31:in `process_link_attr'
  lib/gitlab/markdown/upload_link_filter.rb:18:in `block in call'
  lib/gitlab/markdown/upload_link_filter.rb:17:in `call'
  lib/gitlab/markdown.rb:127:in `gfm'
  lib/gitlab/markdown.rb:24:in `render'
  app/helpers/gitlab_markdown_helper.rb:61:in `markdown'
  app/views/search/results/_issue.html.haml:9:in `block in _app_views_search_results__issue_html_haml__4127460390996300432_59973760'
  app/views/search/results/_issue.html.haml:8:in `_app_views_search_results__issue_html_haml__4127460390996300432_59973760'
  app/views/search/_results.html.haml:20:in `_app_views_search__results_html_haml__589475855773452465_61761440'
  app/views/search/show.html.haml:5:in `_app_views_search_show_html_haml___1852335078065998536_69780120'
```

Confirmed this is issue still happens in GitLab 8.4, and it also happens on GitLab.com. Here's how to reproduce:

1. Login in a new browser.
2. Enter a search term on the top right that will land a hit in the "Issues" (e.g. GitLab).
3. Click on "Issues" tab. You should get an Error 500.

The issue is that @project isn't assigned to anything.

See merge request !2110
2015-12-23 22:46:23 +00:00
Valery Sizov efe98067da emoji picker search 2015-12-23 13:08:47 +02:00
Stan Hu 34695569da Fix Error 500 when global milestones have slashes
Closes #4226
2015-12-22 13:15:32 -08:00
Valery Sizov d794ae8e1f add frequently used category to emoji picker 2015-12-22 23:04:19 +02:00
Stan Hu 4949f40ac4 Fix Error 500 when doing a search in dashboard before visiting any project
If a search turned up an issue, under certain conditions you would see this error:

```
ActionView::Template::Error (undefined method `path_with_namespace' for nil:NilClass):
     6:   - if issue.description.present?
     7:     .description.term
     8:       = preserve do
     9:         = search_md_sanitize(markdown(issue.description))
    10:   %span.light
    11:     #{issue.project.name_with_namespace}
    12:   - if issue.closed?
  lib/gitlab/markdown/upload_link_filter.rb:36:in `build_url'
  lib/gitlab/markdown/upload_link_filter.rb:31:in `process_link_attr'
  lib/gitlab/markdown/upload_link_filter.rb:18:in `block in call'
  lib/gitlab/markdown/upload_link_filter.rb:17:in `call'
  lib/gitlab/markdown.rb:127:in `gfm'
  lib/gitlab/markdown.rb:24:in `render'
  app/helpers/gitlab_markdown_helper.rb:61:in `markdown'
  app/views/search/results/_issue.html.haml:9:in `block in _app_views_search_results__issue_html_haml__4127460390996300432_59973760'
  app/views/search/results/_issue.html.haml:8:in `_app_views_search_results__issue_html_haml__4127460390996300432_59973760'
  app/views/search/_results.html.haml:20:in `_app_views_search__results_html_haml__589475855773452465_61761440'
  app/views/search/show.html.haml:5:in `_app_views_search_show_html_haml___1852335078065998536_69780120'
```
2015-12-22 11:13:09 -08:00
Stan Hu 301a30e0ea Add project permissions to all project API endpoints
This standardizes all the project API formats. Also needed to support Huboard.
2015-12-22 10:58:23 -08:00