Commit Graph
1115 Commits
Author SHA1 Message Date
Stan Hu 2ce7559d70 Fix repository cache invalidation issue when project is recreated with an empty repo
To reproduce:

1. Create a project with some content
2. Rename the project
3. Create a new project with the same name.
4. Boom - 404.

After step 2, the branch and tag counts were not being cleared. This would
cause `repository.has_visible_content?` to erroneously return `true`
for the newly-created project.

Closes #13384
2016-04-13 00:04:17 -07:00
Douglas Barbosa Alexandre 7afeace354 Merge branch 'master' into decouple-member-notification 2016-04-08 15:48:09 -03:00
Stan Hu 27b9f64efb Expire caches after project creation to ensure a consistent state
Closes #14961
2016-04-07 00:29:01 -07:00
Rémy Coutable e79b867d2b Ensure empty recipients are rejected in BuildsEmailService
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-06 16:14:51 +02:00
Douglas Barbosa Alexandre f2005fa566 Flush repository cache before import project data
GitHub Pull Requests importer handle with the repository while
importing data, we need to make sure that the cached values are valid.
2016-04-04 19:35:39 -03:00
Rubén Dávila e6b5716785 Migrate Repository#local_branches from gitlab-ee.
This will help us to avoid posible merge conflicts when merging
gitlab-ce to gitlab-ee
2016-04-01 14:21:08 -05:00
Rémy Coutable f9ab215b21 Merge branch 'error-when-ldap-doesn-t-supply-an-email-address-14559' into 'master'
Allow temp-oauth-email as notification email

Closes #14559 

/cc @dblessing @rymai 

See merge request !3477
2016-04-01 14:12:42 +00:00
connorshea 85cc172959 Remove "Congratulations!" tweet button on newly-created project.
I’ve removed everything related to the feature based on this commit:
ce08f919f34fd8849834365

Resolves #10857.
2016-03-31 17:09:36 -06:00
Zeger-Jan van de Weg 1e7116b34d Exclude projects pending deletion from all results 2016-03-31 20:20:18 +02:00
Zeger-Jan van de Weg 2c6207135e Allow temp-oauth-email as notification email 2016-03-31 19:59:19 +02:00
Rémy Coutable 95c7aa62de Merge branch 'fix-todos' into 'master'
Destroy related todos when an Issue/MR is deleted

Closes #14550 

Closes #14598

See merge request !3376
2016-03-31 16:43:12 +00:00
Yorick Peterse 84764847f7 Merge branch 'reorder-project-expire-cache' into 'master'
Expire the exists cache before deletion to ensure project dir actually exists

See merge request !3413
2016-03-30 22:51:36 +00:00
Zeger-Jan van de Weg 4b1ad75ab5 minor cleanup in system_hook_spec 2016-03-30 20:00:57 +02:00
Douglas Barbosa Alexandre 9b93f8adc8 Destroy related todos when an issue is deleted 2016-03-30 12:09:34 -03:00
Dmitriy Zaporozhets 630c86a7a3 Add spec for user_id uniq in NotificationSetting model
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-30 10:44:20 +02:00
Dmitriy Zaporozhets 4ca73f56cb Small refactoring and cleanup of notification logic
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-30 10:44:20 +02:00
Dmitriy Zaporozhets 31b0e53015 Introduce NotificationSetting model
It will hold notification setting per group or per project. It will
allow get rid of notification level stored in Member model

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-30 10:44:20 +02:00
Robert Speicher a9f5df384e Merge branch 'fix_wip_in_mr_api' into 'master'
Ensuring Merge Request API returns boolean values for work_in_progress

Fixes #14692.

See merge request !3432
2016-03-29 18:49:08 +00:00
Abhi Rao 762d6ab4fd Ensuring Merge Request API returns boolean values for work_in_progress
Fixes #14692
2016-03-28 22:11:44 -05:00
Stan Hu 2fa20f2d4f Handle nil descriptions in Slack issue messages
Closes #14676
2016-03-28 04:15:41 -07:00
Stan Hu 2e328c1ea7 Expire the exists cache before deletion to ensure project dir actually exists
Closes #14659
2016-03-27 08:52:44 -07:00
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 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
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 9e7e2c6b9d Small refactoring and rewording
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-25 13:18:55 +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
Grzegorz Bizon 915bfedfa7 Do not allow to move issue if it has not been persisted 2016-03-23 09:41:39 +01: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
Zeger-Jan van de Weg 6e5461c6ee Merge branch 'master' into 2489-soft-delete-issues 2016-03-21 19:32:37 +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 45e8650c4f Fix specs 2016-03-20 23:26:58 +01:00
Douwe Maan 19aa20d528 Fix more specs 2016-03-20 23:09:33 +01:00
Douwe Maan 7c51d5efec Fix some specs 2016-03-20 22:55:08 +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 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
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