Commit Graph
702 Commits
Author SHA1 Message Date
Douwe Maan 37fc82ace9 Resolve conflicts 2015-11-19 16:47:34 +01:00
Robert Speicher ed2a8ba600 Merge 8-2-stable into 8-2-stable-ee
Conflicts remaining:

- app/controllers/groups/group_members_controller.rb
- app/controllers/projects/project_members_controller.rb
- app/models/ability.rb
- app/models/member.rb
- app/models/project.rb
2015-11-19 10:33:18 -05:00
Douwe MaanandRobert Speicher 834e440f70 Merge branch 'mirror-repository' into 'master'
Add option to mirror an upstream repository.

Closes internal https://dev.gitlab.org/gitlab/gitlab-ee/issues/279

Depends on gitlab-org/gitlab-shell!29

To do:

- [x] Decide on what user should be the author of the activity feed events. The initial project creator perhaps? That makes sense for personal projects, but less so for group projects, where it's even possible that the creator has since left the team.
- [x] Write specs!
- [x] Write documentation
- [x] Port back relevant commits to CE: gitlab-org/gitlab-ce!1822

----

## Mirror status on project homepage

![Screen_Shot_2015-11-12_at_12.48.15](/uploads/39666b0e4a14723407b0f66e2aaddb46/Screen_Shot_2015-11-12_at_12.48.15.png)


## Settings navigation item

![Screen_Shot_2015-11-10_at_17.32.27](/uploads/116ece85f65681bbd3c7c5e282ab3b3c/Screen_Shot_2015-11-10_at_17.32.27.png)

## Mirroring settings

![Screen_Shot_2015-11-17_at_11.17.17](/uploads/ff57c89831524435ec6a063c3c470203/Screen_Shot_2015-11-17_at_11.17.17.png)


## Activity feed with new "pushes" (mirror updates)
![activity_feed](/uploads/04754251f2142fd06b1fddc2aae45232/activity_feed.png)

I have yet to decide on what user should be the author of these events. The initial project creator perhaps? That makes sense for personal projects, but less so for group projects, where it's even possible that the creator has since left the team.

## Warning that branch has diverged from upstream
![diverged](/uploads/ecf7ae6c5709f626c750695f45ca521a/diverged.png)

## Commits heading after failed update
![commits_failure](/uploads/d1b3e1f6796431c839ee9e2f67499283/commits_failure.png)

Link send user to the mirroring settings if they are a project admin.

## Mirroring settings after failed update

![Screen_Shot_2015-11-12_at_12.43.09](/uploads/ece68d5021c9a4c374bf6d973cf9fafa/Screen_Shot_2015-11-12_at_12.43.09.png)

## New project page
![new_project](/uploads/296beb6c7faf390a9b7e1facc9c1d4d6/new_project.png)

## Import form after failed import
(Screenshot outdated)

![new_import_failure](/uploads/ac0ebfc8ec23232603126fe0a6e10171/new_import_failure.png)

Shown when the initial import of a project fails, not when an update of an existing project fails.

cc @dzaporozhets @sytses @JobV

See merge request !51
2015-11-18 16:50:49 -05:00
Valery Sizov 7d7691cd09 Merge remote-tracking branch 'origin/master' into ce-to-ee 2015-11-16 13:37:13 +02:00
Dmitriy Zaporozhets 6c8dded20b Merge branch 'fix_trailing_title_space' of https://gitlab.com/dblessing/gitlab-ce 2015-11-16 10:40:49 +01:00
Robert Speicher 37fe73c337 Merge remote-tracking branch 'ce/master' into ce-to-ee 2015-11-15 00:30:17 -05:00
Robert Speicher 6afca45028 Merge remote-tracking branch 'ce/master' into ce-to-ee 2015-11-13 12:34:34 -05:00
Kamil Trzcinski 6384c757b7 Expose CI enable option in project features
- Enable CI by default for all new projects
2015-11-13 10:52:50 +01:00
Minsik Yoonand윤민식 3d0efa8e0a Add ignore white space option in merge request diff
fix this issue(https://gitlab.com/gitlab-org/gitlab-ce/issues/1393).

Add ignore whitespace optoin to Commits Compare view
2015-11-13 16:53:53 +09:00
Dmitriy Zaporozhets 63144cd062 Merge pull request #9820 from huacnlee/avoid-render-form-in-notes-list
Avoid render edit_form in each notes.
2015-11-12 11:55:55 +01:00
Jason Lee 1974087114 Avoid render edit_form in each notes.
Use RJS to render edit note feature.

Before:

```
Rendered projects/notes/_note.html.haml (27.9ms)
Rendered projects/_zen.html.haml (0.3ms)
Rendered projects/notes/_hints.html.haml (0.7ms)
Rendered projects/_md_preview.html.haml (3.9ms)
Rendered projects/notes/_edit_form.html.haml (6.9ms)
Rendered projects/notes/_note.html.haml (17.7ms)
Rendered projects/_zen.html.haml (0.3ms)
Rendered projects/notes/_hints.html.haml (0.6ms)
Rendered projects/_md_preview.html.haml (3.4ms)
Rendered projects/notes/_edit_form.html.haml (7.0ms)
```

After:

```
Rendered projects/notes/_note.html.haml (13.8ms)
Rendered projects/notes/_note.html.haml (7.1ms)
Rendered projects/notes/_note.html.haml (9.5ms)
Rendered projects/notes/_note.html.haml (8.5ms)
```

This change reduce at least 6ms * N ('N' - number of notes).
2015-11-12 13:16:35 +08:00
Kamil Trzciński fb5c3c7021 Merge branch 'artifacts' into 'master'
Implement Build Artifacts

This implements #3028 

1. It stores artifacts in shared/artifacts,
1. It adds `artifacts` to `.gitlab-ci.yml`,
1. We use GitLab Workhorse to offload artifacts uploading,
1. To download artifacts it uses GitLab Workhorse X-Sendfile extension,
1. There's one "artifact" per-build. The new upload removes previous one and creates a new one,
1. Default max artifact size is set to 100MB - this can be changed in settings.

Missing things:
1. Support for `.gitlab-ci.yml`: `artifacts: true or git-ls-files` which will upload all non tracked files,
1. Artifacts passing between builds.

GitLab Workhorse changes: https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/5
GitLab Runner changes: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/merge_requests/46

Syntax:
```
artifacts:
  untracked: true # default: false
  paths: # default: empty
  - bin/files
```


See merge request !1584
2015-11-11 12:44:37 +00:00
Drew Blessing 752d528019 Fix trailing space issue with merge requests and issues. Fixes #2514 2015-11-10 15:41:49 -06:00
Dmitriy Zaporozhets 7181fdd23e Merge branch 'issue_3072_target_name' into 'master'
Display target branch on MR list when it is different from project's default

Fixes #3072

The screenshot below shows both previous and current UI state:

![branch-mr-both](/uploads/5c1f0519e42bae4655f3eee37edfc356/branch-mr-both.png)

First merge request has default branch as a target, second one has non default branch as target.

See merge request !1741
2015-11-10 12:28:45 +00:00
Kamil Trzcinski d0e3e823a2 Implement Build Artifacts
- Offloads uploading to GitLab Workhorse
- Use /authorize request for fast uploading
- Added backup recipes for artifacts
- Support download acceleration using X-Sendfile
2015-11-10 12:51:50 +01:00
Dmitriy Zaporozhets 354b69dde2 Merge remote-tracking branch 'origin/release-notes'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-10 10:20:22 +01:00
Anton Baklanov 746e49fee9 Display target branch on MR list when it is different from project's default 2015-11-10 09:31:14 +02:00
Dmitriy Zaporozhets b7619dad52 Add missing param and title for tag
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-09 15:39:18 +01:00
Dmitriy Zaporozhets b67fdfff3c Refactor release code a bit
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-09 15:30:50 +01:00
Dmitriy Zaporozhets 900419c43c Improve UI for tags page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-05 17:08:47 +01:00
Kamil Trzcinski ba68facf8d CI details cleanup
- Add page titles to CI settings.
- Fix CI admin navigation.
- Remove duplicated scope.
- Use monospace font for commit sha.
- Add page title and header title to build page.
- Proper authorization for cancel/retry builds.
- Use gitlab pagination theme for builds and group members.
- Don't paginate builds widget on build page.
- Add badges to commit page Changes/Builds tabs.
- Add "Builds" to commit Builds tab page title.
- Add and use Ci::Build#retryable? method.
- Add CI::Build#retried? method.
- Allow all failed commit builds to be retried.
- Proper authorization for cancel/retry all builds.
- Remove unused param.
- Use time_ago_with_tooltip where appropriate.
- Tweak builds index text
- Remove duplication between builds/build and commit_statuses/commit_status.
- Use POST rather than GET for canceling and retrying builds.
- Remove redundant URL helpers.
- Add build ID to build page.
- Link branch name on build page.
- Move commit/:sha/ci to commit/:sha/builds.
2015-11-05 15:24:27 +01:00
Dmitriy Zaporozhets 26677fbe21 After tag is created - redirect to tag page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-05 14:07:55 +01:00
Dmitriy Zaporozhets 312cf11b61 Add release description to new tag form
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-05 14:03:48 +01:00
Dmitriy Zaporozhets 850bb21b12 Create show page for tag and render release notes there and on index page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-05 13:49:34 +01:00
Valery Sizov 93bcc9ca7f Merge remote-tracking branch 'origin/master' into ce_upsteram 2015-11-05 14:26:35 +02:00
Dmitriy Zaporozhets a4d75e3aec Add ability to edit and show release notes
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-05 12:15:25 +01:00
Dmitriy Zaporozhets ba67af79a9 More release related logic to separate resource
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-05 11:16:41 +01:00
Dmitriy Zaporozhets 33b8f00263 Add edit/update tag actions for future release notes
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-05 10:51:12 +01:00
Alex Lossent f4501143d2 Allow configuring the Jira API URL
A DB migration takes care of initializing the API URL using the same logic as before.
Remove the api_version property which now seems redundant.
2015-10-30 14:34:39 +01:00
Valery Sizov 83473a4f56 Page is not reloaded periodically to check if rebase is finished 2015-10-29 20:17:35 +02:00
Ben FordandDouwe Maan 3be9d2c422 Add ability to create directories in the editor
Simply type a name with a `/` directory separator and new directories
will be created. This does not do the fancy UI work that github.com
does, but it will get the job done.

I could not find tests for file creation, so I didn't add a test for
this slight behaviour modification. I did test directory traversals
though, using both absolute paths like `/tmp/foo.txt` and relative paths
like `../../foo.txt`. Neither case escaped the repository, though
attempting to traverse with a relative path resulted in a 500 error that
did not affect application stability upon reload.
2015-10-29 15:49:07 +01:00
Kamil Trzcinski 6db014987d Fix specific runner visibility 2015-10-26 11:23:11 +01:00
Robert Speicher 17c60173f6 Merge branch 'fix-ci-regressions' into 'master'
Fix CI regressions

This MR fixes a couple of small CI regressions
- Allow developer to manage builds
- On CI Admin page show only projects that are present in GitLab
- On Runner CI Admin page show only projects that are present in GitLab
- Refresh build log only when status changes
- Show the oldest builds on top when viewing Builds - it most cases it shows running builds on top
- Fix Lint rendering
- Fix number of other builds in build widget

Fixes #3164

Fixes #3161 

Fixes gitlab-org/gitlab-ci#343

See merge request !1679
2015-10-23 14:06:34 +00:00
Valery Sizov 0f30be02eb Merge remote-tracking branch 'origin/master' into ce_upstream 2015-10-23 13:01:19 +02:00
Dmitriy Zaporozhets 3bb39f0e49 Merge branch 'comments_fix' into 'master'
Fix: Inability to reply to code comments in the MR view, if the MR comes from a fork

https://dev.gitlab.org/gitlab/gitlabhq/issues/2535

See merge request !1675
2015-10-23 09:46:18 +00:00
Kamil Trzcinski 3adfee1c87 Allow developer to manage builds 2015-10-23 11:45:45 +02:00
Kamil Trzcinski 127836dd54 Fix small CI UI regressions 2015-10-23 11:45:45 +02:00
Valery Sizov 95df86638d Fix: Inability to reply to code comments in the MR view, if the MR comes from a fork 2015-10-22 18:38:00 +02:00
Dmitriy Zaporozhets 01315cfe76 Merge branch 'hanloong/gitlab-ce-add-dates-snippets-show' into 'master'
Update style of snippets pages

![Screen_Shot_2015-10-18_at_13.04.13](/uploads/95d58b64fa81aa4e75568d2d7b4a6b08/Screen_Shot_2015-10-18_at_13.04.13.png)

![Screen_Shot_2015-10-21_at_11.11.10](/uploads/106371d718a07a9ccdad9148812211fd/Screen_Shot_2015-10-21_at_11.11.10.png)

Replaces !1567.

Fixes #1767 and #2538.


See merge request !1637
2015-10-22 13:34:34 +00:00
Kamil Trzcinski 40934ae39b Fix 500 when editing CI services 2015-10-22 11:14:15 +02:00
Douwe Maan d37cf64237 Merge branch 'master' into hanloong/gitlab-ce-add-dates-snippets-show 2015-10-21 10:24:06 +02:00
Dmitriy Zaporozhets f16bfa401f Merge branch 'merge-request-deleted-file' into 'master'
Correctly find last known blob for file deleted in MR.

Fixes #3092.

When building a new MR, `@merge_request.commits.last` would fail because this delegates to `merge_request_diff` which is still `nil` at that point. I fixed that, and changed some of the logic because showing deleted blob contents didn't previously work for the Compare page, and the UI would show the wrong commit sha for "View File @...".

See merge request !1647
2015-10-20 16:24:01 +00:00
Stan Hu 9bfc531ec6 Redirect to a default path if HTTP_REFERER is not set
Safari 9.0 does not yet honor the HTML5 `origin-when-cross-origin` mode,
and it's possible load balancers/proxies strip the HTTP_REFERER from
the request header. In these cases, default to some default path.

Closes #3122

Closes https://github.com/gitlabhq/gitlabhq/issues/9731
2015-10-20 07:45:48 -07:00
Douwe Maan 8710739e4e Correctly find last known blob for file deleted in MR. 2015-10-20 14:24:02 +02:00
Yorick Peterse 4ff75e3179 Improve performance of sorting milestone issues
This cuts down the time it takes to sort issues of a milestone by about
10x. In the previous setup the code would run a SQL query for every
issue that had to be sorted. The new setup instead runs a single SQL
query to update all the given issues at once.

The attached benchmark used to run at around 60 iterations per second,
using the new setup this hovers around 600 iterations per second. Timing
wise a request to update a milestone with 40-something issues would take
about 760 ms, in the new setup this only takes about 130 ms.

Fixes #3066
2015-10-19 11:37:14 +02:00
Douwe Maan 946f00ed7f Update style of snippets pages 2015-10-18 13:03:26 +02:00
Zeger-Jan van de Weg 94a788f66d Only accept open issues and merge requests 2015-10-16 09:59:32 +02:00
Zeger-Jan van de Weg 9f9f0c35ec Show merge requests which close current issue 2015-10-16 09:46:59 +02:00
Robert Speicher 2d7be2d499 Merge remote-tracking branch 'ce/master' 2015-10-16 00:12:30 -04:00
Valery Sizov c0577a317c Merge branch 'master' into ce_upstream_15_10 2015-10-15 17:25:02 +03:00