Commit Graph
3622 Commits
Author SHA1 Message Date
Rémy Coutable 500337c4b2 Merge branch 'iurisilvio/gitlab-ce-bitbucket_closed' into 'master'
Fix bug where Bitbucket 'closed' issues were imported as 'opened'

_Originally opened at !2930 by @iurisilvio._

- - -

Bitbucket has an undocumented status `closed`.

https://confluence.atlassian.com/bitbucket/issues-resource-296095191.html

Related to https://gitlab.com/gitlab-com/support-forum/issues/559

See merge request !2973
2016-03-09 12:54:52 +00:00
Dmitriy Zaporozhets bc14d81af0 Merge branch 'rs-snippets-dont-expire' into 'master'
Remove `Snippet#expires_at`

This was removed from the interface in
https://github.com/gitlabhq/gitlabhq/pull/6027 but its implementation
lingered around for two years.

See merge request !3103
2016-03-09 09:02:17 +00:00
Robert Speicher fe9a445faa Merge branch 'evuez/gitlab-ce-add-info-user-api' into 'master'
Expose User#last_sign_in_at and User#confirmed_at for admins

Closes #840

See merge request !3090
2016-03-08 17:30:10 +00:00
Iuri de SilvioandRémy Coutable 591bf92ce7 Fix bug where Bitbucket closed issues were imported as opened 2016-03-07 19:23:47 +01:00
Douwe Maan 99f08b3f72 Merge branch 'feature/cross-project-labels' into 'master'
Add support for cross project references for labels

## Summary

Support for cross project references for labels.

## Rationale

1.   Cross project label references are currently not supported in GitLab
1.   `to_reference` method signature in `Label` model breaks the abstraction introduced in `Referable`.

      `concerns/referable.rb:  def to_reference(_from_project = nil)`

      Signatures:

      ```
      label.rb:           def to_reference(format = :id)

      commit_range.rb:    def to_reference(from_project = nil)
      commit.rb:          def to_reference(from_project = nil)
      external_issue.rb:  def to_reference(_from_project = nil)
      group.rb:           def to_reference(_from_project = nil)
      issue.rb:           def to_reference(from_project = nil)
      merge_request.rb:   def to_reference(from_project = nil)
      milestone.rb:       def to_reference(from_project = nil)
      project.rb:         def to_reference(_from_project = nil)
      snippet.rb:         def to_reference(from_project = nil)
      user.rb:            def to_reference(_from_project = nil)
      ```

     This MR suggests using `def to_reference(from_project = nil, format: :id)` which makes use of keyword arguments and preserves abstract interface.

1.   We need support for cross project label references when we want to move issue to another project

     It may happen that issue description, system notes or comments contain reference to label and this reference will be invalid after moving issue to another project and will not be displayed correctly unless we have support for cross project references.

     Merge request that needs this feature: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2831


I think that cross project label references may be useful, (example: `Hey, see our issues for CI in GitLab CE! - gitab-org/gitlab-ce~"CI"`).

cc @JobV @DouweM @rspeicher 

See merge request !2966
2016-03-07 09:16:22 +00:00
Robert Speicher 836d593033 Remove Snippet#expires_at
This was removed from the interface in
https://github.com/gitlabhq/gitlabhq/pull/6027 but its implementation
lingered around for two years.
2016-03-05 18:12:17 -05:00
Robert Speicher 9bbf873e46 Merge branch 'master' into 'master'
Reduce progress bar noise during brakeman run

See merge request !3101
2016-03-05 22:43:02 +00:00
Robert Speicher 0c7626f3a5 Merge branch 'rs-frontmatter-pre' into 'master'
Properly display YAML front matter in Markdown

See merge request !3072
2016-03-05 00:17:58 +00:00
Robert Speicher 8eaeda0816 Add YamlFrontMatterFilter to the PreProcessPipeline
This filter will detect YAML Front Matter and convert it to an HTML
table for prettier formatting.
2016-03-04 18:05:48 -05:00
Peter Suschlik 6f837df08e Reduce progress bar noise during brakeman run 2016-03-04 22:12:25 +00:00
Douwe Maan 925da3fdf8 Merge branch 'rs-wiki-pipeline-spec' into 'master'
Add a spec for WikiPipeline

Removes the specs from GollumTagsFilter that were more like integration
tests for the pipeline than unit tests of the filter.

See merge request !3054
2016-03-04 21:19:11 +00:00
evuezandRémy Coutable b0d24ab1b5 Add fields to GET /users/* API endpoints for admins
Added fields are last_sign_in_at and confirmed_at.
They are available for GET /users/ and GET /users/:id for admins.

Closes #840
2016-03-04 11:59:43 +01:00
Robert Speicher def6446dad Replace [[_TOC_]] tag even if toc result is blank 2016-03-03 12:41:40 -05:00
Jacob Vosmaer 1764e1b7cb Use Gitlab::Git::DiffCollections 2016-03-03 18:38:44 +01:00
Grzegorz Bizon fa639df5c7 Remove redundant code in cross project labels implementation 2016-03-03 10:41:11 +01:00
Grzegorz Bizon 7183a7da6d Add additional text prefix in cross project labels 2016-03-03 10:41:11 +01:00
Grzegorz Bizon a472c1bfd0 Add support for cross project references for labels 2016-03-03 10:41:11 +01:00
Grzegorz Bizon dbc7bf7fe1 Fix bug with return value in abstract reference filter
When `object_class.link_reference_pattern` was `nil` because object
being processed do not implemement link references `call` method
returned `nil` instead of returning document, even if document has been
processed in for basic reference pattern.
2016-03-03 10:41:11 +01:00
Robert Speicher 74751791a8 Add a PreProcessPipeline 2016-03-02 22:19:36 -05:00
Douwe Maan 8eadb373ec Merge branch 'rs-filter-array' into 'master'
Add FilterArray class to Banzai



See merge request !3053
2016-03-02 10:46:23 +00:00
Douwe Maan 8ec49e47ec Merge branch 'mail-room-config-without-rails' into 'master'
Don't load all of GitLab in mail_room

Fixes #12731

cc @jacobvosmaer 

See merge request !3005
2016-03-02 10:43:57 +00:00
Kazuki SawadaandRémy Coutable fc170baf3f Fix import from gitlab.com
Fixes #12652
2016-03-02 10:35:44 +01:00
Robert Speicher c9b1132217 Add FilterArray class to Banzai 2016-03-01 15:54:35 -05:00
Douwe Maan 9b3c1a8c4f Merge branch 'fix/commit-status-api-improvement' into 'master'
Return empty array when commit has no statuses in API

This makes API endpoint for Commit Statuses return empty array instead
of 404 when commit exists, but has no statuses.

Closes #3080

See merge request !3010
2016-03-01 16:50:23 +00:00
Douwe Maan 3d1de5ba35 Merge branch 'rs-wiki-toc' into 'master'
Replace Gollum `[[_TOC_]]` tag with result of TableOfContentsFilter

Closes #2494

See merge request !2952
2016-03-01 16:06:40 +00:00
Douwe Maan c50a20e790 Merge branch 'comment-batch-size' into 'master'
Batch size >1000 does not pay off

We did a small experiment to see how a full scan of the Redis keys on
gitlab.com speeds up as we increase the batch size. The values on the
right are time in seconds for a full scan (no delete operations).

```
count: 10);      284.500529021
count: 100);      86.21216934
count: 1_000);    60.931676195
count: 10_000);   60.96355610
count: 100_000);  62.378172541
```

It looks like 1,000 is a good number.

See merge request !2970
2016-03-01 13:52:49 +00:00
Grzegorz Bizon 85a461e096 Check if commit exists first in commit status API 2016-03-01 11:11:50 +01:00
Robert Speicher edf5e9eb05 Merge branch 'fix/project-wiki-ending' into 'master'
Fix for project paths ending in .wiki

This prevents `Git operation was rejected by pre-receive hook` when
an actual project ending with .wiki is thought to be a wiki by the
`Internal` API.

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

See merge request !2960
2016-02-29 17:50:40 +00:00
Douwe Maan cd391b66e9 Merge branch 'rs-data-links' into 'master'
Sanitize `data` and `vbscript` links

Closes #13625 

Closes https://dev.gitlab.org/gitlab/gitlabhq/issues/2660

See merge request !2905
2016-02-29 13:22:38 +00:00
Grzegorz Bizon dcc67ac1fd Return empty array when commit has no statuses in API
This makes API endpoint for Commit Statuses return empty array instead
of 404 when commit exists, but has no statuses.

Closes #3080
2016-02-29 13:54:33 +01:00
Douwe Maan e1baa48584 Fix gitlab:incoming_email:check task. 2016-02-29 11:04:40 +01:00
James Lopez c401e8338b updated internal.rb and spec based on MR feedback 2016-02-26 10:40:30 +01:00
Jacob Vosmaer a310901280 Batch size >1000 does not pay off
We did a small experiment to see how a full scan of the Redis keys on
gitlab.com speeds up as we increase the batch size. The values on the
right are time in seconds for a full scan (no delete operations).

count: 10);      284.500529021
count: 100);      86.21216934
count: 1_000);    60.931676195
count: 10_000);   60.96355610
count: 100_000);  62.378172541

It looks like 1,000 is a good number.
2016-02-25 13:50:08 +01:00
James Lopez d377948931 fix for projects ending in .wiki 2016-02-24 15:54:36 +01:00
Robert Speicher 989946f337 Sanitize vbscript: links
Closes https://dev.gitlab.org/gitlab/gitlabhq/issues/2660
2016-02-23 20:42:03 -05:00
Robert Speicher bc43ad71ef Replace Gollum [[_TOC_]] tag with result of TableOfContentsFilter
Closes #2494
2016-02-23 18:25:40 -05:00
Marin Jankovski f317d5fcb9 Merge branch 'uploads-700' into 'master'
Restrict permissions on public/uploads

Based on https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests/631

See merge request !2764
2016-02-23 15:12:20 +00:00
Robert Speicher 4225fd229f Sanitize data: links
Closes #13625
2016-02-21 17:33:35 -05:00
Douwe Maan f81b55bd35 Merge branch 'refactor-scan' into 'master'
Improve readability of 'rake cache:clear' code



See merge request !2892
2016-02-20 01:05:00 +00:00
Kamil Trzcinski 46fd485c58 Fix API implementation 2016-02-19 18:30:43 +01:00
Kamil Trzcinski 921cfb66e6 Introduce API for serving the artifacts archive 2016-02-19 18:30:13 +01:00
Grzegorz Bizon 73c9d80bdc Record user that erased a build through API 2016-02-19 17:24:59 +01:00
Grzegorz Bizon 7d5a182624 Use POST method instead of DELETE when erasing a build
Discussion:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2560#note_3742042
2016-02-19 17:24:59 +01:00
Grzegorz Bizon 287cc838ce Fix build api specs after rebase 2016-02-19 17:24:59 +01:00
Grzegorz Bizon 293999cabb Fix name of build erasable, remove superfluous method from it 2016-02-19 17:24:59 +01:00
Grzegorz BizonandGrzegorz Bizon 13f92521c2 Move build eraseable API to proper API context 2016-02-19 17:24:59 +01:00
Grzegorz BizonandGrzegorz Bizon df313634d0 Do not allow to modify build if it has been erased 2016-02-19 17:24:59 +01:00
Grzegorz BizonandGrzegorz Bizon 21152d7d51 Use DELETE verb for erasing a build content
Also added API specs for that
2016-02-19 17:24:59 +01:00
Grzegorz BizonandGrzegorz Bizon 6ca99bd899 And CI API endpoint where user can erase a build 2016-02-19 17:24:59 +01:00
Grzegorz Bizon f6a91ccc5b Move eraseable implementation to build concern 2016-02-19 17:24:03 +01:00