Commit Graph
3390 Commits
Author SHA1 Message Date
Douwe Maan 93b4a3a156 Merge branch 'fix/todos-for-private-group-mentions' into 'master'
Fix adding a todo for private group memebers



See merge request !4081
2016-05-09 18:31:41 +00:00
Rémy Coutable 0c2bb8d1d7 Merge branch 'issue_15394' into 'master'
Sanitize milestones and labels titles

fixes #15394 

See merge request !4046
2016-05-09 15:47:48 +00:00
Felipe Artur 32811d98fe Make model sanitization methods one liners 2016-05-09 12:00:32 -03:00
Rémy Coutable 8dd2188b83 Merge branch '2954-api-expose-issue-user_notes_count' into 'master'
API: Expose Issue#user_notes_count and MergeRequest#user_notes_count

_Originally opened at !2954 by @cnam812._

- - -

Expose `Issue#user_notes_count` and `MergeRequest#user_notes_count` through the API.

See merge request !3126
2016-05-09 14:53:13 +00:00
Rémy Coutable bdfe6dc319 Merge branch 'fix-secret' into 'master'
Don't read otp_secret_encryption_key from hardcoded path in models/user

Variable `Gitlab::Application.config.secret_key_base` is set in config/initializers/secret_token.rb. It's very bad practice to use hard-coded paths inside an application and really unnecessary in this case.

Mirror of https://github.com/gitlabhq/gitlabhq/pull/10311

See merge request !4044
2016-05-09 14:17:33 +00:00
cnam-depandRémy Coutable 5364400741 API: Expose Issue#user_notes_count 2016-05-09 16:07:35 +02:00
Rémy Coutable 4cc85a58e8 Merge branch 'wiki-fix' into 'master'
Use the proper GitLab URL for links in Wiki

Fixes gitlab-org/gitlab-ce#17071

wiki links are proper compiled, e.g.
```
[same-level](same-level) -> <a href="same-level">same-level</a>
[sub-level](sub/level) -> <a href="sub/level">sub-level</a>
[upper-level](../upper-level) -> <a href="../upper-level">upper-level</a>
```

See merge request !4026
2016-05-09 10:40:01 +00:00
Dmitriy Zaporozhets 90ae445ba9 Merge branch 'rs-remove-wall_enabled' into 'master'
Remove `wall_enabled` field from Project



See merge request !4089
2016-05-09 10:02:59 +00:00
Artem Sidorenko 14b36f91d9 Use the proper GitLab URL for links in Wiki 2016-05-09 11:50:23 +02:00
Stan Hu 4be77d0b05 Improve multiple branch push performance by memoizing permission checking
If you attempt to push thousands of branches at once, the 60-second timeout
will occur because GitAccess checking does a lot of work to check if the
user has permission to push to a branch. This changes does two things:

1. Instead of making 1 DB query per branch push, use a memoized list of protected branches to check
2. Memoize what permissions the user has to perform on this project

On a test of 10,000 branch pushes, this prevents gitlab-shell from hitting the 60-second
timeout.

Closes #17225
2016-05-09 01:17:14 -07:00
Robert Speicher 0e29653f51 Remove wall_enabled field from Project 2016-05-08 15:47:42 -04:00
Stan Hu a65de9c2c1 Reduce delay in destroying a project from 1-minute to immediately
Run ProjectDestroyWorker after pending_delete attribute has been committed to DB
2016-05-07 01:12:31 -07:00
Ahmad Sherif ab4671f26a Fix adding a todo for private group members
Fixes #14002
2016-05-07 01:37:29 +02:00
Dmitriy Zaporozhets 2dcd3f29dd Annotate models
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-05-06 16:13:35 +02:00
Grzegorz Bizon e65b78c6f1 Merge branch 'remove-unexpected-filtering' into 'master'
Use outer join for issues ordering by milestones due.

This MR contains an implementation for Solution 1 suggested in #14183 

Ordering by Milestone due sooner/later ("milestone sort") filters issues without a milestone, which can let users feel like disappearing issues without a milestone.

See merge request !3872
2016-05-06 11:48:03 +00:00
Takuya Noguchi 4ab49fab94 Use outer join for issues ordering by milestones due. 2016-05-06 19:57:26 +09:00
Zeger-Jan van de Weg 47da013cf8 Annotate the models 2016-05-06 08:27:46 +02:00
Felipe Artur d028863eda Sanitize milestones and label titles 2016-05-05 16:37:49 -03:00
Jakub Jirutka e4c64855e8 Don't read otp_secret_encryption_key from hardcoded path in models/user
Variable `Gitlab::Application.config.secret_key_base` is set in
config/initializers/secret_token.rb. It's very bad practice to use
hard-coded paths inside an application and really unnecessary in this
case.
2016-05-04 23:09:47 +02:00
Rémy Coutable 1a9d505972 Merge branch 'use-rugged-to-create-tag' into 'master'
Use Rugged's TagCollection#create instead of gitlab-shell's Repository#add_tag for better performance

This was originally opened at !1757 by @pcarranza but I changed it to use Rugged instead of gitlab_git, following @DouweM's request.

Once this is merged, https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/26 will be mergeable too.

See merge request !3745
2016-05-04 16:07:13 +00:00
Douwe Maan 6a8359f3d3 Merge branch 'pacoguzman/gitlab-ce-15001-since-and-until-operators-api-commits'
# Conflicts:
#	Gemfile.lock
2016-05-04 17:27:47 +02:00
Rémy Coutable 209f2f1e6f Use a similar approach to branch creation for tag creation
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-05-04 17:19:13 +02:00
Rémy Coutable 44f89eafc0 Use Rugged's TagCollection#create instead of gitlab-shell's Repository#add_tag for better performance
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-05-04 17:19:13 +02:00
Connor Shea 3004386b55 Revert "Remove the Devise Async gem."
This reverts commit 1cc614f2bd.

It was causing the ActiveJob integration to fail, so unfortunately we'll have to add the gem again.
2016-05-03 15:43:51 -06:00
Robert Speicher c9bc3d20ef Merge remote-tracking branch 'dev/master' into 'master' 2016-05-02 19:58:54 -04:00
Stan Hu f64b82e1da Support e-mail notifications for comments on project snippets
Closes #2334
2016-05-02 11:01:32 -07:00
Gabriel Mazetto 0cd5edf35c Backported minimal safewebhook implementation to GitLab CE 2016-04-30 05:04:10 -03:00
Yorick Peterse b6a18f1093 Tweak checking branches in Project#open_branches
This changes 4 things:

1. Project#protected_branches_names has been renamed to
   Project#protected_branch_names.

2. Project#open_branches uses a Set for the branch names as checking
   values in a Set is faster than checking values in a (large) Array.

3. Some redundant code in Project#open_branches has been removed.

4. Project#protected_branch_names now uses #pluck instead of #map,
   removing the need for loading entire DB records into memory.
2016-04-29 22:44:08 +02:00
Yorick Peterse e28d1fa3cc Use a query in Project#protected_branch?
This changes Project#protected_branch? to use a query to check if a
branch is protected, instead of loading all ProtectedBranch records into
memory just to check if the list of names includes a given branch name.
2016-04-29 22:21:06 +02:00
Rémy Coutable bfc6a0e371 Merge branch 'gitattributes' into 'master'
Support supressing text file diffs on the default branch with .gitattributes

This change allows users to suppress diffs for text files by adding an entry to the `.gitattributes` file. To take effect the file present at the HEAD of the default branch.

When rendering a diff, if the file is text according to the charlock holmes gem (via the `text?` method) but the file is not diffable according to the project repository, then a message is displayed stating that the diff was suppressed.

![image](/uploads/2e119b725875a301e30d9ad482e283b3/image.png)

I looked into ways to do this using a `binary` flag as suggested by @stanhu in [this comment](https://gitlab.com/gitlab-org/gitlab-ce/issues/2315#note_4435454), however, there was no good way to seperate what was a real binary file from one that had been marked as not diffable in `.gitattributes`.

Fixes and closes gitlab-org/gitlab-ce#2315.

See merge request !3806
2016-04-29 12:40:13 +00:00
Matt Oakes 28dcdb2779 Support supressing text file diffs on the default branch with .gitattributes
This is a combination of 3 commits.

- Update the bare repositories info/attributes if the default branch is updated
- Check the diff attributes of a file before showing a diff
- Update CHANGELOG
2016-04-29 12:45:15 +01:00
Arinde Eniola ded3b02f33 Use a better message when milestone is newly created
make some changes for the checks to determine when the messages should be displayed

add item to changelog and also integration test

make some changes to the test

make some changes
2016-04-29 10:15:49 +01:00
Paco Guzman c4b9bd0413 API support for the 'since' and 'until' operators on commit requests
- Parameter validation as ISO8601 format
2016-04-29 09:26:52 +02:00
Zeger-Jan van de Weg ad99404d25 Properly handle bigger files 2016-04-28 21:28:39 +02:00
Grzegorz Bizon bdb86ea6cf Render canceled status if any of the jobs canceled
This status will be returned only when there are no failed jobs
that are not allowed to fail.
2016-04-27 14:16:01 +02:00
Connor Shea c402aeef02 Allow alternative names for the CHANGELOG file.
"CHANGELOG", "NEWS", "HISTORY", and "CHANGES" are recognized as Changelog files.

Also adds relevant tests for each of these names.

Resolves #14864.
2016-04-26 11:40:35 -06:00
Connor Shea 1cc614f2bd Remove the Devise Async gem.
The extra gem isn’t necessary anymore since Rails 4.2 has ActiveJob integration.

Resolves #15575.
2016-04-26 10:41:48 -06:00
Rémy CoutableandRobert Speicher ef340f6e77 Ensure URL in all Service subclasses are valid
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-25 15:28:24 -04:00
Rémy Coutable 533cd8c2ee Throttle the update of project.last_activity_at to 1 minute
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-25 17:25:46 +02:00
Stan Hu 6dff1a9a2b Fix Error 500 due to stale cache when projects are renamed or transferred
Closes gitlab-org/gitlab-ee#506
2016-04-25 06:57:50 -07:00
Rémy Coutable b8c4a65da7 Fix license detection to detect all license files, not only known licenses
Fixes #15470.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-25 10:31:28 +02:00
Douwe Maan 7ded28ff99 Merge branch 'fix/label-filters' into 'master'
Filter labels by including ALL filter titles

Fixed query to use `AND` and not `OR`. Refactored relevant specs

See merge request !3815
2016-04-21 13:13:10 +00:00
Kamil Trzciński d240666800 Merge branch 'ci-commit-as-pipeline' into 'master'
Ci::Commit becomes a Pipeline object

1. Ci::Commit receives context: ref, :tag.
1. One Ci::Commit describes a one Pipeline
1. Pipeline is created from `.gitlab-ci.yml`
1. Pipeline is a ordered group of builds
1. We test MR against Pipeline
1. Pipelines have a separate view (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3703)
1. Pipeline can be triggered from UI (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3703)
1. Later we change `Trigger -> TriggerRequest -> Build` to `Trigger -> Pipeline` (future)
1. We add a Pipeline Hook that will be triggered on Pipeline status change  (future)
1. We extend notifications to use `Pipeline Hook` to send summary on pipeline changes (future)

After merging that I'll prepare a separate MR that will unify naming, database columns, table names:
```
Ci::Commit -> Pipeline
Ci::Build -> Build
CommitStatus -> Job
GenericCommitStatus -> ExternalJob

ci_commits -> pipelines
ci_builds -> jobs
```

This MR implements first 5 points.

This is made to solve this issue https://gitlab.com/gitlab-org/gitlab-ce/issues/14149.

See merge request !3653
2016-04-21 08:10:37 +00:00
James Lopez 07f8ffbdaf Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into fix/label-filters
# Conflicts:
#	spec/features/issues/filter_by_labels_spec.rb
2016-04-21 08:37:38 +02:00
Rémy CoutableandRobert Speicher 3a7290f387 Move Issue scopes from Issuable to Issue model
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-20 15:43:32 -04:00
Rémy CoutableandRobert Speicher 159f959b61 Move due_date sort scopes to Issue and fix CHANGELOG
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-20 15:43:32 -04:00
Rémy CoutableandRobert Speicher 6cdf4acd4e Address MR feedback
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-20 15:43:32 -04:00
Mehmet BeydoganandRobert Speicher c6be4ec544 Add red color to overdue and open issues 2016-04-20 15:42:09 -04:00
Mehmet BeydoganandRobert Speicher 61a306aa58 Fix functionality of due this week. Add due this month and overdue, remove due tomorrow to issues.
Fix typos on sorting dropdown related to due date
Remove constant array and add Structs on Issue to keep due date data to fill options
2016-04-20 15:42:09 -04:00
Mehmet BeydoganandRobert Speicher 83bda94ffc Update due date asc scope for mysql 2016-04-20 15:42:09 -04:00