Commit Graph
4393 Commits
Author SHA1 Message Date
Douglas Barbosa Alexandre 02b0c37cab Refactor Todo#target 2016-03-18 13:27:27 -03:00
Douglas Barbosa Alexandre 2a8858ca8a Rename Todo#to_reference to Todo#target_reference
Since we're not actually returning a todo reference.
2016-03-18 13:24:47 -03:00
Douglas Barbosa Alexandre 231d4fb9f8 Use Commit#short_id instead of Commit.truncate_sha 2016-03-18 11:07:30 -03:00
Douglas Barbosa Alexandre a5bad46505 Update schema info comment on todo related files 2016-03-18 11:00:53 -03:00
Douglas Barbosa Alexandre fb72271e24 Use todo.done without ! in the controller to mark todo as done 2016-03-18 11:00:53 -03:00
Douglas Barbosa Alexandre c29da3f8ca Trigger a todo for mentions on commits page 2016-03-18 11:00:53 -03:00
Douwe Maan dadd28e317 Merge branch 'fix-mr-source-sha' into 'master'
Fix MergeRequest#source_sha when there is no diff

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/14170

### Overview

This MR fixes an unhandled Exception when visiting the page of an open Merge Request  without diff.

### Description

`MergeRequest#source_sha` is expected to return the sha of the source branch last commit. But when an open Merge Request has no diff (e.g. all commits have already been merged to the target branch), `merge_request.source_sha` incorrectly returns `nil`.

This was without consequences before – but since !2217 was merged (a few days ago), it makes `Gitlab::Git::Commit.between` raise an "Unexpected nil argument" exception. This can be reproduced when visiting the http://localhost:3000/gitlab-org/gitlab-test/merge_requests/2 page on a fresh local Gitlab setup.

This MR fixes the crash, by making sure that `source_sha` returns a
correct result even when there is no diff available. I also added tests.

@DouweM I believe you wrote most of this code in the first place ; does this looks correct to you, or is there a better way to resolve this issue maybe?

See merge request !3135
2016-03-18 12:28:43 +00:00
Jacob Schatz f4b6a89252 Merge branch 'issue-fade-load' into 'master'
Changing filter dropdowns shows loading

Instead of doing a full refresh of the page - i've modified the filterResults method on the Issues object to work for this form as well

![issues](/uploads/3335f09f7df88b6d419de7fd3d6857d2/issues.gif)

Closes #14359

See merge request !3237
2016-03-18 12:25:09 +00:00
Douwe Maan 9813eac56b Merge branch 'confidential-issues' into 'master'
Add confidential issues

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/3678

More information: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/227

See merge request !3282
2016-03-18 12:04:56 +00:00
Phil Hughes 16d02de56e Fixed issue with dashboard issues not reloading 2016-03-18 11:40:16 +00:00
Yorick Peterse 3f0d780c19 Show a notice for diffs that are too large
This builds on the changes introduced in
https://gitlab.com/gitlab-org/gitlab_git/merge_requests/72 and results
in merge requests with large diffs (e.g. due to them containing minified
CSS) loading much faster.
2016-03-18 12:30:46 +01:00
Douglas Barbosa Alexandre 9222459ea3 Restrict access to confidential issues on activity feed 2016-03-17 20:56:00 -03:00
Douglas Barbosa Alexandre 482bfd1a6d Restrict access for confidential issues on milestone view 2016-03-17 20:55:59 -03:00
Douglas Barbosa Alexandre f2ba4e3d36 Restrict access to confidential issues on search results 2016-03-17 20:55:59 -03:00
Douglas Barbosa Alexandre e4f1c001e6 Restrict access to confidential issues through API 2016-03-17 20:55:59 -03:00
Douglas Barbosa Alexandre 7ee528336a Restrict access for confidential issues on autocomplete 2016-03-17 20:55:59 -03:00
Douglas Barbosa Alexandre 43d8bdb4f0 Restrict access to references for confidential issues 2016-03-17 20:55:59 -03:00
Douglas Barbosa Alexandre 34ee75379c Restrict access to confidential issues 2016-03-17 20:55:38 -03:00
Yorick Peterse dd4b789765 Added tests for Repository#build_cache 2016-03-17 21:45:43 +01:00
Yorick Peterse cd05d3f78d Cache project avatars stored in Git
The avatar logic has been moved from Project to Repository as this makes
caching easier. The logic itself in turn has been changed so that the
logo file names are cached in Redis. This cache is flushed upon pushing
a commit but _only_ if:

1. The commit was pushed to the default branch
2. The commit actually changes any of the logo files

If no branch or commit is given the cache is flushed anyway, this
ensures that calling Repository#expire_cache without any arguments still
flushes the avatar cache (e.g. this is used when removing a project).

Fixes gitlab-org/gitlab-ce#14363
2016-03-17 18:51:54 +01:00
Kamil Trzciński f728e4b519 Merge branch 'glalonde-triggerbuild' into 'master'
Adjusted behavior so canceled builds tagged as allowed to fail do not fail build

## What does this MR do?
This diff changes the 'Allowed to fail' flag to also ignore canceled builds, whereas before, canceled builds could fail the suite even if they were marked as 'Allowed to fail'

dupe of !3258 to force a build

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

## Why was this MR needed?
Unexpected behavior as a user

## What are the relevant issue numbers?

## Screenshots (if relevant)
![whatisgoingon](/uploads/fcd7c8f3d8454bc730d7fd41eff59b31/whatisgoingon.png)

See merge request !3271
2016-03-17 15:51:11 +00:00
Geoffrey Lalonde 4117c815df adjusted behavior so canceled builds tagged as allowed to fail do not fail build 2016-03-17 07:55:10 -07:00
Douwe Maan 21af7459ab Merge branch '4009-external-users' into 'master'
External Users

The user has the rights of a public user execpt it can never create a project, group, or team. Also it cant view internal projects.

Partially fix for both #4009 and #13938 (except the LDAP sync or a pattern to detect external users)


![Screen_Shot_2016-03-14_at_22.02.52](/uploads/486a84ab3acb98c6cfb71a4ec7d268e2/Screen_Shot_2016-03-14_at_22.02.52.png)

See merge request !3171
2016-03-17 14:15:38 +00:00
Zeger-Jan van de Weg 9337406671 Fix specs
Spinach was right, I was a fool..
2016-03-17 12:05:54 +01:00
Zeger-Jan van de Weg 481e73fb76 Merge branch 'master' into new-branch-button-issue 2016-03-17 11:13:16 +01:00
Zeger-Jan van de Weg 51300d9b2a API support for setting External flag on existing users 2016-03-17 09:36:00 +01:00
Hiroyuki Sato f0b052e168 Fix wiki search results point to raw source 2016-03-17 08:58:52 +09:00
Pierre de La Morinerie 18295585d9 Fix MergeRequest#source_sha when there is no diff
`MergeRequest#source_sha` is expected to return the sha of the source
branch last commit.

But when a open Merge Request has no diff (e.g. all commits have already
been merged to the target branch), `merge_request.source_sha`
incorrectly returns `nil`.

This was un-noticed before – but now that !2217 has been merged,
it makes `Gitlab::Git::Commit.between` raise an
"Unexpected nil argument" exception.

This fixes the crash, by making sure that `source_sha` returns a
correct result even when there is no diff available.
2016-03-16 14:02:04 +01:00
Pierre de La Morinerie 7cbf8fd0d0 Add tests for MergeRequest#source_sha 2016-03-16 13:56:47 +01:00
Robert Speicher 374037b8a3 Merge branch 'issue_14306' into 'master'
Return an empty Array when there aren't lines to parse.

Fixes #14306

See merge request !3243
2016-03-16 01:29:09 +00:00
Douwe Maan f83a596db3 Merge branch 'worker-for-user-deletion' into 'master'
A worker deletes a user, so the request doesn't time out

Fixes #13261


See merge request !2855
2016-03-16 01:18:46 +00:00
Rubén Dávila 7e03b40221 Return an empty Array when there aren't lines to parse. 2016-03-15 19:51:27 -05:00
Robert Speicher 64d0dd1807 Merge branch 'fix-capybara-deprecation-warnings' into 'master'
Fix Capybara 2.6.2 deprecation warnings

See merge request !3236
2016-03-16 00:00:38 +00:00
Zeger-Jan van de Weg 29a43373ce Specs for the DeleteUserService 2016-03-15 22:19:51 +01:00
Zeger-Jan van de Weg 4827458155 Incorporate the review and update spec
The feature spec now also tests the absence of the new branch button
2016-03-15 21:59:25 +01:00
Zeger-Jan van de Weg 8077a5f958 Clearify who deletes the user 2016-03-15 21:09:25 +01:00
Zeger-Jan van de Weg a09323c9f5 Fix broken specs 2016-03-15 21:09:25 +01:00
Zeger-Jan van de Weg 4231cfeba5 Target right release, rebase got it wrong 2016-03-15 21:09:25 +01:00
Zeger-Jan van de Weg d249da1c16 Specs on force deleting of a user 2016-03-15 21:09:25 +01:00
Zeger-Jan van de Weg 4bcc097750 A worker deletes a user, so the request doesn't time out
Fixes #13261
2016-03-15 21:09:25 +01:00
Zeger-Jan van de Weg 2b97c92119 Incorporate review 2016-03-15 20:21:11 +01:00
Zeger-Jan van de WegandZeger-Jan van de Weg ad97bebfed Enhance new branch button on an issue 2016-03-15 20:21:11 +01:00
Zeger-Jan van de WegandZeger-Jan van de Weg 228007dfbc new-branch-button 2016-03-15 20:21:11 +01:00
Zeger-Jan van de Weg 59064aeeef Merge branch 'master' into 4009-external-users 2016-03-15 19:16:16 +01:00
Stan Hu 7c61bdcf6f Fix Capybara 2.6.2 deprecation warnings 2016-03-15 11:03:17 -07:00
Rémy Coutable 54ec7e9599 Improving the original label-subscribing implementation
1. Make the "subscribed" text in Issuable sidebar reflect the labels
   subscription status

2. Current user mut be logged-in to toggle issue/MR/label subscription
2016-03-15 18:22:02 +01:00
Timothy AndrewandRémy Coutable 0444fa560a Original implementation to allow users to subscribe to labels
1. Allow subscribing (the current user) to a label

- Refactor the `Subscription` coffeescript class
  - The main change is that it accepts a container, and conducts all
    DOM queries within its scope. We need this because the labels
    page has multiple instances of `Subscription` on the same page.

2. Creating an issue or MR with labels notifies users subscribed to those labels

- Label `has_many` subscribers through subscriptions.

3. Adding a label to an issue or MR notifies users subscribed to those labels

- This only applies to subscribers of the label that has just been
  added, not all labels for the issue.
2016-03-15 17:25:37 +01:00
Robert Speicher 178c80a561 Merge branch 'fix-activerecord-join-stupidity' into 'master'
Ignore eager loading in Project.search UNION

This fixes issues such as filtering groups by names on pages such as
https://gitlab.com/dashboard/groups.

See merge request !3229
2016-03-15 16:25:02 +00:00
Rémy Coutable 5c1f6f8cfc Merge branch 'revert-avatar-cropping' into 'master'
Revert the avatar cropping feature

Reverts !2951 since the added 'mini_magick' dependency should be replaced by client-side croppping

See merge request !3223
2016-03-15 15:53:42 +00:00
Yorick Peterse c742760289 Ignore eager loading in Project.search UNION
The queries that are UNION'd together don't need any eager loading
(since we really only use the resulting SQL instead of having
ActiveRecord actually run the queries). By dropping any eager loaded
associations queries such as the following work instead of producing a
SQL error:

    Project.all.includes(:namespace).search('foo')
2016-03-15 16:46:17 +01:00