Commit Graph
3156 Commits
Author SHA1 Message Date
Stan Hu c1834664a7 Merge branch 'handle-avatar-in-empty-repo' into 'master'
Don't attempt to look up an avatar in repo if repo directory does not exist

Relates to https://sentry.gitlap.com/gitlab/gitlabcom/issues/3507/

Closes #14580



See merge request !3390
2016-03-27 00:21:57 +00:00
Dmitriy Zaporozhets ea8bd204e3 Merge branch 'feature--preferences-dashboard-groups' of https://gitlab.com/eliasw/gitlab-ce 2016-03-26 11:08:48 +01:00
Dmitriy Zaporozhets 2fdf928afa Merge branch 'ci-setup-info' into 'master'
Add links to CI setup documentation from project settings and builds pages

For #14483 

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

See merge request !3384
2016-03-26 09:57:47 +00:00
Dmitriy Zaporozhets 179bae9968 rescue Rugged::ReferenceError in Repository#gitlab_ci_yml method
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-25 17:54:57 +01:00
Stan Hu 506878970b Don't attempt to look up an avatar in repo if repo directory does not exist
Closes #14580
2016-03-25 06:30:51 -07:00
Dmitriy Zaporozhets ed8e1faa4c Make sure Repository#gitlab_ci_yml is safe to use even when repository is missing
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-25 14:19:20 +01:00
Elias Werberich c3a98d8fcc Implementing 'Groups View' and 'TODOs View' as options for dashboard preferences.
Fixes #14585.
2016-03-24 19:59:54 +01:00
Douglas Barbosa Alexandre 39a51f9e1c Rename Event#proper? to Event#visible_to_user? 2016-03-24 14:24:22 -03:00
Douglas Barbosa Alexandre 239560331a Comments on confidential issues doesn't show in activity feed to non-members 2016-03-24 14:22:01 -03:00
Dmitriy Zaporozhets b105b84e3a Use head tree (cached) for file search. Also add some tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-24 15:38:16 +01:00
Dmitriy Zaporozhets 3b1543cd15 Detect build setup state based on gitlab_ci.yml presense
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-24 15:17:13 +01:00
Robert Speicher 0e85a8b816 Merge branch 'issue_14453' into 'master'
Strip commit title when creating revert commit.

Fixes #14453 

See merge request !3352
2016-03-23 16:46:23 +00:00
Douwe Maan b651a4fd41 Fix Milestone.upcoming 2016-03-23 15:09:58 +00:00
Lin Jen-Shin ecc060d701 Make sure we get only two returns 2016-03-23 20:22:09 +08:00
Douwe Maan 703f7c5d57 Merge branch 'fix-sorting-by-votes-on-groups-page' into 'master'
Fix sorting issues/mrs by votes on the groups page

Closes #14394 

The `non_archived` scope applied here https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/controllers/concerns/issues_action.rb#L5 overrides the previous `ORDER BY` applied inside the IssuesFinder, with the default scope of the Project model, resulting in SQL errors.

```ruby
Issue.reorder(created_at: :desc).joins(:project).to_sql
=> "SELECT issues.* 
    FROM issues INNER JOIN projects ON projects.id = issues.project_id
    ORDER BY issues.created_at DESC"

Issue.reorder(created_at: :desc).joins(:project).merge(Project.non_archived).to_sql
=> "SELECT issues.* 
    FROM issues INNER JOIN projects ON projects.id = issues.project_id 
    WHERE projects.archived = 'f'
    ORDER BY projects.id DESC"

Issue.reorder(created_at: :desc).joins(:project).merge(Project.non_archived.only(:where)).to_sql
=> "SELECT issues.* 
    FROM issues INNER JOIN projects ON projects.id = issues.project_id 
    WHERE projects.archived = 'f'
    ORDER BY issues.created_at DESC"
```

/cc @yorickpeterse 

See merge request !3333
2016-03-23 10:35:54 +00:00
Douwe Maan 3b39ce3252 Merge branch 'notifications-for-subscribers-confidential-issue-labels' into 'master'
Restrict notifications for confidential issues

Closes #14468 

/cc @rymai 

See merge request !3334
2016-03-23 10:34:20 +00:00
Grzegorz Bizon 915bfedfa7 Do not allow to move issue if it has not been persisted 2016-03-23 09:41:39 +01:00
Rubén Dávila f4a361a2a8 Sanitize commit title when creating revert commit. 2016-03-22 18:01:31 -05:00
Douglas Barbosa Alexandre 8ca5b33175 Fix issues count on labels page 2016-03-22 15:29:57 -03:00
Douwe Maan 31266c5be4 Address feedback 2016-03-22 00:09:20 +01:00
Douwe Maan ae7b2ef62c Merge branch 'master' into issue_12658
# Conflicts:
#	app/models/issue.rb
#	app/views/projects/_home_panel.html.haml
#	app/views/shared/projects/_project.html.haml
#	db/schema.rb
#	spec/models/project_spec.rb
2016-03-21 23:22:21 +01:00
Douglas Barbosa Alexandre 100e3e7601 Fix sorting issues/mrs by votes on the groups page
The `non_archived` scope applied here
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/controllers/conc
erns/issues_action.rb#L5 overrides the previous `ORDER BY` applied
inside the IssuesFinder, with the default scope of the Project model,
resulting in SQL errors.
2016-03-21 17:01:38 -03:00
Douwe Maan 4a16802615 Merge branch '2489-soft-delete-issues' into 'master'
Soft delete issuables

Fixes #2489 

What still needs to happen: research on the indexes, the gem suggests a [lot of changes](https://github.com/rubysherpas/paranoia#about-indexes) though this is probably a good idea to discuss and I'm unsure on the impact of an omnibus upgrade as I suspect creating about 10 new indexes has a large impact on the downtime.

TODO: 
- [x] Also group owners can ***soft*** delete
- [x] Button should be hidden

See merge request !2982
2016-03-21 19:28:48 +00:00
Zeger-Jan van de Weg 6e5461c6ee Merge branch 'master' into 2489-soft-delete-issues 2016-03-21 19:32:37 +01:00
James Lopez cae864a12e Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into fix/safe-import-url 2016-03-21 18:52:55 +01:00
James Lopez 4196ee0661 update safe_import_url to prevent tokens to be showed by the UI 2016-03-21 18:52:21 +01:00
Zeger-Jan van de Weg 3b088fc5b5 Minor improvements on IssuableActions 2016-03-21 16:59:35 +01:00
Robert Speicher ffc3acd498 Merge branch 'issues-show-performance' into 'master'
Improve performance of viewing individual issues

This MR does two things:

1. `Issue#related_branches` no longer performs Git operations that aren't needed
2. The output of `Repository#exists?` is now cached and flushed properly

Combined these two changes should further cut down the amount of Git operations performed when viewing individual issues (and possibly other pages).

See merge request !3296
2016-03-21 14:42:25 +00:00
Douwe Maan b689e2c0e0 Fix spec 2016-03-21 00:42:30 +01:00
Douwe Maan 45e8650c4f Fix specs 2016-03-20 23:26:58 +01:00
Douwe Maan 7c51d5efec Fix some specs 2016-03-20 22:55:08 +01:00
Douwe Maan fd8d44ca61 Fix group project selection in IssuableFinder 2016-03-20 21:14:39 +01:00
Douwe Maan 8db1292139 Tweaks, refactoring, and specs 2016-03-20 21:04:07 +01:00
Douwe Maan 2eb19ea3ea Merge branch 'master' into issue_12658 2016-03-20 14:57:25 +01:00
Grzegorz Bizon 797af06491 Merge branch 'master' into feature/issue-move
* master:
  Fix bug where wrong commit ID was being used in a merge request diff to show old image
  Remove CHANGELOG item that was added during merge resolution
  Improve the "easy WIP & un-WIP from link" feature
  Fix specs
  \#to_branch_name now uses the iid as postfix
  Add label description in tooltip to labels in issue index and sidebar
  Easily (un)mark merge request as WIP using link
  Use specialized system notes when MR is (un)marked as WIP
  another attempt to fix oauth issue
  attempting to fix omniauth problem

Conflicts:
	app/assets/javascripts/issuable_form.js.coffee
2016-03-20 11:01:08 +01:00
Yorick Peterse 68a4c98f50 Cache output of Repository#exists?
This caches the output of Repository#exists? in Redis while making sure
it's flushed properly when creating new repositories, deleting them,
etc.

For the ProjectWiki tests to work I had to make ProjectWiki#create_repo!
public as testing private methods in RSpec is a bit of a pain.
2016-03-19 21:54:08 +01:00
Yorick Peterse 41b8d22631 Tweaked performance of Issue#related_branches
Requesting the branch names of a repository works even when it's empty,
thus there's no need to explicitly check for an empty repository.
Removing this check cuts down the amount of Git operations which in turn
cuts down request timings a bit. The regular expression used to compare
branches was also moved out of the loop so it's created only once.
2016-03-19 21:54:08 +01:00
Zeger-Jan van de Weg 7342a4566c Dry destroy action on issuables 2016-03-19 21:24:05 +01:00
Zeger-Jan van de Weg 67043ec53b Hide delete botton on edit page 2016-03-19 21:23:03 +01:00
Zeger-Jan van de Weg 212e83bab3 Soft delete issuables 2016-03-19 21:23:03 +01:00
Jacob Schatz 3f22a92f4a Merge branch 'remove-wip' into 'master'
Easily (un)mark merge request as WIP using link

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/3768 and https://gitlab.com/gitlab-org/gitlab-ce/issues/3516

## Link to add `WIP` prefix (underline is visible because of hover)
![wipless_title](/uploads/72a6f7119ba9d8043ca8329641e97c3b/wipless_title.png)

## Link to remove `WIP` prefix
![wip_title](/uploads/8620ad65da9ef620b180603520fead55/wip_title.png)

## System note after WIP is added
![wip_sysnote](/uploads/2de073b75e854d2c9e243eb8b5d5c259/wip_sysnote.png)

## Widget with link to remove WIP
![wip_widget](/uploads/cf83ea93743c4c26d9df759c17cb9d7b/wip_widget.png)

## Flash after WIP is removed
![wip_flash](/uploads/27b7240cd5d7ceeb8b7b477abd94d7ff/wip_flash.png)

## System note after WIP is removed
![wipless_sysnote](/uploads/c0d3368abdf21a2f253532a9a9594d90/wipless_sysnote.png)

## Widget when current user cannot remove the WIP prefix
![wip_widget_unauthorized](/uploads/174ccf1674be86dc81c3078fe297acb7/wip_widget_unauthorized.png)

cc @creamzy 

See merge request !3006
2016-03-19 20:06:59 +00:00
Douwe Maan cb124d1476 Merge branch 'issue-branch-iid-postfix' into 'master'
#to_branch_name now uses the iid as postfix

Given the branch name 'mep-mep' with an iid being 1,
the current way, master's way, would yield a branch name of
1-mep-mep. The problem for larger projects however would be that
a developer might forget what iid the issue was.

When this developer would try to tab complete it would:
- Or result in 20+ branches possibly
- Or start with the wrong digit, try again with digit++
  - Would see 20 branches, repeat

Thus the obvious way of solving this is letting the dev tab complete
on the issue title, which is easier to remember.

@DouweM Should this be labelled `pick-in-master`? 

See merge request !3308
2016-03-19 18:54:18 +00:00
Grzegorz Bizon 0115ad66d2 Merge branch 'master' into feature/issue-move
* master: (121 commits)
  Dedupe labels in labels selector in Dashboard pages
  Refactor colors and lists
  Add a safeguard in MergeRequest#compute_diverged_commits_count
  Fix an issue when the target branch of a MR had been deleted
  Add avatar to issue and MR pages header
  Cleanup somce css colors
  Re-group scss variables
  Refactor `Todo#target`
  Fixes issue with filter label missing on labels & milestones
  Rename `Todo#to_reference` to `Todo#target_reference`
  Fixed failing tests
  Updated controller with before_action Fixed other issues based on feedback
  Fixes issue on dashboard issues
  Full labels data in JSON
  Fixed issue with labels dropdown getting wrong labels
  Update CHANGELOG
  Use `Note#for_project_snippet?` to skip notes on project snippet
  Use `Commit#short_id` instead of `Commit.truncate_sha`
  Reuse `for_commit?` on conditional validations
  Update schema info comment on todo related files
  ...

Conflicts:
	app/models/issue.rb
	db/schema.rb
	spec/models/issue_spec.rb
2016-03-19 18:50:15 +01:00
Grzegorz Bizon 9b13ce0b7a Improvements in issue move feaure (refactoring)
According to endbosses' suggestions.
2016-03-19 18:46:01 +01:00
Felipe Artur 8b830b8c3b Fix specs 2016-03-18 21:04:53 -03:00
Rémy Coutable cafa408b25 Merge remote-tracking branch 'origin/master' into remove-wip 2016-03-18 23:29:18 +01:00
Rémy Coutable 0b942541da Improve the "easy WIP & un-WIP from link" feature 2016-03-18 23:27:35 +01:00
Zeger-Jan van de WegandFelipe Artur b959ae553b Improve group visibility level feature 2016-03-18 16:58:04 -03:00
Zeger-Jan van de Weg 70ca3370eb \#to_branch_name now uses the iid as postfix
Given the branch name 'mep-mep' with an iid being 1,
the current way, master's way, would yield a branch name of
1-mep-mep. The problem for larger projects however would be that
a developer might forget what iid the issue was.

When this developer would try to tab complete it would:
- Or result in 20+ branches possibly
- Or start with the wrong digit, try again with digit++
  - Would see 20 branches, repeat

Thus the obvious way of solving this is letting the dev tab complete
on the issue title, which is easier to remember.
2016-03-18 19:34:04 +01:00
Rémy Coutable bc92de8f03 Add a safeguard in MergeRequest#compute_diverged_commits_count
We have to ensure source_sha and target_sha are not nil before calling
Gitlab::Git::Commit.between.
2016-03-18 19:01:20 +01:00