Commit Graph
4247 Commits
Author SHA1 Message Date
James Lopez cc8aafeded typo 2016-03-10 18:41:57 +01:00
James Lopez a7acfa6614 add project members to export 2016-03-10 16:29:38 +01:00
James Lopez 4b88b4ffd5 fix wiki path issues and spec 2016-03-09 10:35:38 +01:00
James Lopez 99d87d8698 WIP - added wiki repo bundler 2016-03-08 18:17:57 +01:00
James Lopez 556cafa44e added repo bundler spec and refactored some of the export code 2016-03-08 15:53:32 +01:00
James Lopez 4e73f9827c WIP - started working on bundle the repo, refactored some stuff and updated spec 2016-03-08 12:35:37 +01:00
James Lopez 68eae04538 finish project tree saver spec 2016-03-08 10:21:02 +01:00
James Lopez e228453f47 updated spec 2016-03-07 19:14:06 +01:00
James Lopez f9eb3fc0aa WIP - initial export service and spec 2016-03-07 18:26:15 +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
Douwe Maan eab7892dc1 Merge branch 'rs-factory-nitpicks' into 'master'
More Factory cleanup

Addresses nitpicks from https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2847

See merge request !3108
2016-03-07 09:02:49 +00:00
Douwe Maan d43c778402 Merge branch 'indicate-mr-diverged-from-target' into 'master'
Indicate when an MR diverged from the target branch

This adds an indicator to the "Merge MR" box, to tell if and how much an MR diverged from its target branch.

For instance, consider an MR to merge the branch `feature` into `master`. Some other commits were added to `master` since `feature` was created, and the two branches diverged.

```text
o master
|
o    o feature
|    |
o    o
|  /
o
```

In this case, there will be a label in the MR Merge box stating:

> This MR is by 3 commits behind the target branch `master`.

## Screenshots

### The branch diverged from the target (UI Proposal)

![UI_suggestion_1](/uploads/cd5bee3959e68026ec7d5097259d53f4/UI_suggestion_1.png)

### The branch diverged from the target (alternative UI Proposal)

![UI_suggestion_2](/uploads/f36977101b59a610850e129837dfbc83/UI_suggestion_2.png)

## How is this useful?

- In a _rebase-workflow_ (MR are preferably rebased before being merged), the reviewer wants to know if an MR is rebased on the target branch before merging it. 
    
    _With this indicator, the reviewer knows immediately if the branch is rebased, or if she needs to ask the committer to rebase its branch._

<br>

- To keep the git history readable, a team prefers to avoid merging branches that really lag a lot behind the target branch. Merging an MR that is 10 commits behind is fine, but 200 is too much.

    _With this indicator, the reviewer can see on the MR page if the branch is really far behind the target – or only a few commits behind._

## Open questions

We've been using this at @captaintrain for a few months now, and found it quite useful.

I guess the open-questions are mostly: what UI would be the more adequate? Any thoughts on this, on the general usefulness and/or on the code?

See merge request !2217
2016-03-07 09:01:26 +00:00
Robert Speicher 7612fdbaa8 Remove unnecessary attribute definitions from Service factory 2016-03-06 16:55:17 -05:00
Robert Speicher de944c914b Add traits for each access_level to ProjectMember factory 2016-03-06 16:53:22 -05:00
Robert Speicher 042b047fc8 Remove unused another_email factory 2016-03-06 16:34:43 -05: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
Douwe Maan 2f6ded6df9 Merge branch 'rs-no-default-credentials' into 'master'
Allow the initial admin to set a password

Closes #1980

See merge request !3068
2016-03-04 23:48:56 +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
Robert Speicher 599a6d7873 Allow the initial admin to set a password
Closes #1980
2016-03-04 17:37:57 -05:00
Douwe Maan 92d896183b Merge branch 'rs-organize-factories' into 'master'
Factory cleanup

Related: https://gitlab.com/gitlab-org/gitlab-ce/issues/5880

See merge request !2847
2016-03-04 22:27:56 +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
Robert Speicher 6df45eb463 Move all factory definitions to their own file 2016-03-04 15:26:51 -05:00
Dmitriy Zaporozhets 954b98377f Merge remote-tracking branch 'origin/issue_5854' 2016-03-04 14:29:57 +01:00
Robert Speicher 01b89ee8f1 Remove Profile::KeysController#new action 2016-03-03 16:13:59 -05: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
Rémy Coutable 00cb4a9714 Merge branch 'renaming-repository-caching' into 'master'
Flush repository caches before renaming projects

This should hopefully solve gitlab-org/gitlab-ce#13790. Once I know the exact steps to reproduce the problem I should be able to confirm this.

cc @dblessing @inem 

See merge request !2974
2016-03-03 15:35:11 +00:00
Rubén Dávila eb068b0fff Add commit message to JIRA's notification payload. 2016-03-03 09:55:53 -05:00
Douwe Maan 1cb4f810a5 Merge branch 'issue_13648' into 'master'
Reuse query from ProjectsFinder to get projects accessible to current user.

Fixes #13648

This is a refactor to reuse the existing query from our `ProjectsFinder` class

See merge request !3049
2016-03-03 14:28:25 +00:00
Pierre de La Morinerie 543845f7ef Indicate how much an MR branch diverges from the target branch 2016-03-03 15:11:44 +01:00
Grzegorz Bizon 34769efa79 Change content of cross project label 2016-03-03 10:41:11 +01:00
Grzegorz Bizon 62dcdef969 Improve cross project label look and feel 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 acd877c73e Add cross project references support for label model 2016-03-03 10:41:11 +01:00
Grzegorz Bizon 65ba4da925 Add support for keyword arguments in label reference method 2016-03-03 10:41:11 +01:00
Robert Speicher 76ed2afcfc Change js-quick-submit behavior to expect the class on the form
Now it will work on any field inside that form, and it's easier to scope
new behavior, which is what we're adding next!
2016-03-02 15:11:15 -05:00
Rubén Dávila 49e4ef3b41 Add specs to ForksController#index.
* Also refactor query to get projects accessible for current user.
  ProjectsFinder actually return public projects when no user is passed.
2016-03-02 12:35:56 -05:00
Douwe Maan 386d442a18 Merge branch 'fix/deprecated-ci-badge-permissions' into 'master'
Fix permissions for deprecated CI build status badge

This fixes permissions for deprecated status badge, being unavailable even if project is public.

Closes #13324

See merge request !3030
2016-03-02 11:00:25 +00:00
Douwe Maan ca8a44be82 Merge branch 'issue_13716' into 'master'
Check for conflicts before creating new revert branch

Fixes #13716 

See merge request !2953
2016-03-02 10:51:43 +00: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
Rubén Dávila d9e0191592 Add some specs for Repository#revert. 2016-03-01 19:16:27 -05:00
Robert Speicher 82bc6c6229 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.
2016-03-01 16:59:56 -05:00
Robert Speicher c9b1132217 Add FilterArray class to Banzai 2016-03-01 15:54:35 -05:00
Grzegorz Bizon 8b02d962ab Do not require authentication for CI status badge
This changes only deprecated CI badge that we keep for backwards
compatibility. See !3030#note_4041498.
2016-03-01 20:32:30 +01: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 ad9137a785 Merge branch 'rs-avatar-validation' into 'master'
Only validate avatar cropping values when avatar is present AND changed

Closes #13905

See merge request !3018
2016-03-01 16:03:38 +00:00
Douwe Maan 204a989533 Merge branch 'rs-improve-grace-period' into 'master'
Don't show any "2FA required" message if it's not actually required

Prior, if the user had enabled and then disabled 2FA, they would be
shown a "You must enable Two-factor Authentication for your account."
message when going back to re-activate it, even if 2FA enforcement was
disabled.

See merge request !3014
2016-03-01 16:01:18 +00:00
Grzegorz Bizon 6be22dbbe3 Fix specs for deprecated CI build status badge 2016-03-01 14:42:52 +01:00