Commit Graph

999 Commits

Author SHA1 Message Date
Rémy Coutable 1ff92ed60b Merge branch 'duduribeiro/gitlab-ce-current_password_when_auto_set'
See merge request !5712.
2016-08-09 10:51:15 +02:00
Robert Speicher 900c67bfb9 Merge branch 'rubocop/enable-more-cops-for-empty-lines' into 'master'
Enable some Rubocop cops related to new lines

## What does this MR do?

This MR enabled two additional Rubocop cops:

Keeps track of empty lines around block bodies.  
`Style/EmptyLinesAroundBlockBody`

Keeps track of empty lines around method bodies.  
` Style/EmptyLinesAroundMethodBody`

See merge request !5637
2016-08-08 23:31:00 +00:00
Carlos Ribeiro ed63ead22a Avoid to show the original password field when password is automatically seted 2016-08-08 13:55:57 -03:00
Alfredo Sumaran cd086eba79 Wrap param with parens for consistency 2016-08-05 17:19:01 -05:00
Alfredo Sumaran c2912b46f8 Add custom css class to each dropdown to fix failing spec 2016-08-05 17:19:01 -05:00
Alfredo Sumaran 1ac953dab4 Update layout and JS for create protected branch.
Also updates protect branch list
2016-08-05 17:19:01 -05:00
Jacob Schatz 8765d2f9ca Merge branch 'ref-switcher-enter-submit' into 'master'
Fixed enter submitting form in dropdown

## What does this MR do?

When searching for a branch in the ref switcher & then pressing enter it would submit the form without anything. This instead doesn't submit the form without anything being selected in the dropdown.

Also improved the UX by making it submit with `Turoblinks` as currently no loading bar is shown so the user has no idea if anything is happening.

## What are the relevant issue numbers?

Closes #19549 

See merge request !5111
2016-08-05 16:42:31 +00:00
Connor Shea 602fe11191
Remove provider path, replace with dynamic path. 2016-08-03 11:50:38 -06:00
Grzegorz Bizon c7b31e4029 Enable some Rubocop cops related to new lines 2016-08-03 12:02:41 +02:00
Phil Hughes a45071d0ea Merge branch 'master' into ref-switcher-enter-submit 2016-08-03 09:08:24 +01:00
Felipe Artur 9845079950 Fix search results for notes without commits 2016-08-01 11:53:12 -03:00
Rémy Coutable e570b823c1 Merge branch '15064_issuable_default_sort_order' into 'master'
Sensible state specific default sort order for issues and merge requests

## What does this MR do?

It provides more sensible default sort order for issues and merge requests based on the following table:

    | type           | state  | default sort order |
    |----------------|--------|--------------------|
    | issues         | open   | last created       |
    | issues         | closed | last updated       |
    | issues         | all    | last created       |
    | merge requests | open   | last created       |
    | merge requests | merged | last updated       |
    | merge requests | closed | last updated       |
    | merge requests | all    | last created       |

## Are there points in the code the reviewer needs to double check?

All the bits where `id_desc` was changed to `created_desc`.
 
I hope it's okay, It makes more sense in my opinion.

## Why was this MR needed?

Prior to this MR the issues and merge request were sorted based on `id_desc` by default. 

This MR aims to make the interface more user-friendly by providing state specific sorting defaults most users would expect. 

## What are the relevant issue numbers?

See #15064 

See merge request !5453
2016-08-01 12:02:47 +00:00
zs 84a3225b0c State specific default sort order for issuables
Provide more sensible default sort order for issues and merge requests
based on the following table:

| type           | state  | default sort order |
|----------------|--------|--------------------|
| issues         | open   | last created       |
| issues         | closed | last updated       |
| issues         | all    | last created       |
| merge requests | open   | last created       |
| merge requests | merged | last updated       |
| merge requests | closed | last updated       |
| merge requests | all    | last created       |
2016-08-01 11:28:56 +02:00
Rémy Coutable f46d5f5813 Merge branch 'zj-env-external-url' into 'master'
Add an URL field to Enviroments

## What does this MR do?

Adds a field to the `enviroments` table to expose later in other features. Now I see the task list below, I noticed I forgot some minor things, but Ill adress those after the first review. 

## Are there points in the code the reviewer needs to double check?

The field is a string on the database, thus limited to 255 chars, which seems more than enough.

## What are the relevant issue numbers?

Closes #19527

## Screenshots (if relevant)

![Screen_Shot_2016-07-25_at_15.22.16](/uploads/5c3f39466f8e2114195270006aed20c0/Screen_Shot_2016-07-25_at_15.22.16.png)![Screen_Shot_2016-07-25_at_15.22.53](/uploads/408cf86610137dd4a861d15dcd677a2c/Screen_Shot_2016-07-25_at_15.22.53.png)![Screen_Shot_2016-07-25_at_15.23.10](/uploads/927c506931f4e0338cdbbc58678bd308/Screen_Shot_2016-07-25_at_15.23.10.png)

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] API support added
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !5469
2016-08-01 09:04:09 +00:00
Douwe Maan 6ad514d066 Merge branch 'fix/import-project-hooks' into 'master'
fix repo hooks missing on import

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

Repo hooks are missing from imported projects

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !5549
2016-07-29 17:00:13 +00:00
Paco Guzman d05af7b7c6 Check for Ci::Build artifacts at database level 2016-07-29 14:08:41 +02:00
Z.J. van de Weg be9aa7f194 Add an URL field to Environments
This MR adds a string (thus max 255 chars) field to the enviroments
table to expose it later in other features.
2016-07-29 13:54:45 +02:00
Timothy Andrew 0a8aeb46dc Use `Gitlab::Access` to protected branch access levels.
1. It makes sense to reuse these constants since we had them duplicated
   in the previous enum implementation. This also simplifies our
   `check_access` implementation, because we can use
   `project.team.max_member_access` directly.

2. Use `accepts_nested_attributes_for` to create push/merge access
   levels. This was a bit fiddly to set up, but this simplifies our code
   by quite a large amount. We can even get rid of
   `ProtectedBranches::BaseService`.

3. Move API handling back into the API (previously in
   `ProtectedBranches::BaseService#translate_api_params`.

4. The protected branch services now return a `ProtectedBranch` rather
   than `true/false`.

5. Run `load_protected_branches` on-demand in the `create` action, to
   prevent it being called unneccessarily.

6. "Masters" is pre-selected as the default option for "Allowed to Push"
   and "Allowed to Merge".

7. These changes were based on a review from @rymai in !5081.
2016-07-29 15:20:39 +05:30
Timothy Andrew 88fd401d59 Implement review comments from @axil.
1. Align "Allowed to Merge" and "Allowed to Push" dropdowns.

2. Don't display a flash every time a protected branch is updated.
   Previously, we were using this so the test has something to hook onto
   before the assertion. Now we're using `wait_for_ajax` instead.
2016-07-29 15:20:39 +05:30
Timothy Andrew 4d6dadc8f8 Make specs compatible with PhantomJS versions < 2.
1. These versions of PhantomJS don't support `PATCH` requests, so we use
   a `POST` with `_method` set to `PATCH`.
2016-07-29 15:20:39 +05:30
Timothy Andrew f2df2966aa Humanize protected branches' access levels at one location.
1. The model now contains this humanization data, which is the once
   source of truth.

2. Previously, this was being listed out in the dropdown component as well.
2016-07-29 15:20:39 +05:30
Timothy Andrew 9fa661472e Update protected branches spec to work with the `select`s.
1. Get the existing spec passing.

2. Add specs for all the access control options, both while creating and
   updating protected branches.

3. Show a flash notice when updating protected branches, primarily so
   the spec knows when the update is done.
2016-07-29 15:20:39 +05:30
James Lopez 32d8aa6d5e fix repo hooks missing on import
fix spec and added changelog
2016-07-28 17:41:17 +02:00
Lin Jen-Shin 9370bb231b Merge remote-tracking branch 'upstream/master' into new-issue-by-email
* upstream/master: (45 commits)
  Replace reject_blocked with reject_blocked! in callbacks.
  Fix Project#to_param to keep invalid project suitable for use in URLs
  Update CHANGELOG
  Add feature specs for edit project settings
  Fix renaming repository when name contains invalid chars under settings
  Change requests_profiles resource constraint to catch virtually any file
  Allow skipping users in autocomplete
  Fix typo in CHANGELOG
  Update CHANGELOG
  Respective cache is now expired when creating a new branch
  Update CHANGELOG
  Unify HTML format in static error pages
  Make error pages responsive design
  Move color-logic into HipchatService#HipchatService
  Depened on exact version of SimpleCov when patched
  Refactor spam validation to a concern that can be easily reused and improve legibility in `SpamCheckService`
  Refactor `SpamCheckService` to make it cleaner and clearer.
  Submit all issues on public projects to Akismet if enabled.
  Submit new issues created via the WebUI by non project members to Akismet for spam check.
  Upgrade Bullet from 5.0.0 to 5.2.0.
  ...
2016-07-28 14:08:45 +08:00
Douglas Barbosa Alexandre ea4d6c87d7 Fix Project#to_param to keep invalid project suitable for use in URLs 2016-07-27 13:52:45 -03:00
Douglas Barbosa Alexandre 7d483f8c03 Add feature specs for edit project settings 2016-07-27 13:52:45 -03:00
Lin Jen-Shin a1f08a76b5 Merge remote-tracking branch 'upstream/master' into new-issue-by-email
* upstream/master: (38 commits)
  Remove useless new route
  Update gitlab-shell version to 3.2.1 in the 8.9->8.10 update guide
  Fix typo in Elixir CI template
  Add a spec for access_for_user_ids
  Fix typo in comment
  Rubocop offenses
  Optimize the invited group link access level check
  Incorporate review comments
  Optimize maximum user access level lookup in loading of notes
  Fix missing schema update for 20160722221922
  Whitelist 'Simplified BSD' license
  Fix a bug where forking a project from a repository storage to another would fail
  Remove inline scripts from import pages.
  Make branches sortable without push permission (!5462)
  Profile requests when a header is passed
  Upgrade database_cleaner from 1.4.1 to 1.5.3.
  Show release notes in tag list
  Fix expand all diffs button in compare view
  Add route for Import::GithubController#new
  Update CHANGELOG
  ...
2016-07-27 18:11:50 +08:00
Lin Jen-Shin d2b026f092 Test both for having existing issues or not 2016-07-27 18:07:24 +08:00
Lin Jen-Shin 1b1e3ae425 Update the description a bit 2016-07-26 19:01:58 +08:00
Lin Jen-Shin 53e64926b4 Test if we're showing the modal and has the right email 2016-07-26 19:00:36 +08:00
Rémy Coutable e9946f19a5 Merge branch 'remove-branches-feature-spec-head-file' into 'master'
Remove spec/features/projects/branches_spec.rb~HEAD file

## What does this MR do?
Remove unnecessary `spec/features/projects/branches_spec.rb~HEAD` file.

See merge request !5489
2016-07-26 09:52:44 +00:00
Rémy Coutable d06df33daa Ensure current user can retry a build before showing the 'Retry' button
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-07-26 11:05:46 +02:00
Douglas Barbosa Alexandre 53b6e3b8d3 Remove spec/features/projects/branches_spec.rb HEAD file 2016-07-26 00:34:13 -03:00
Douwe Maan 8ec00fbdd2 Merge branch 'khaiql/gitlab-ce-fix/missleading-uri-for-labels-in-merge-requests-and-issues-view' 2016-07-25 18:13:28 -06:00
Douwe Maan 8ce5b4f1a3 Merge branch 'filter-branch-by-name' into 'master'
Users can filter branches by name on project branches page

This MR aims to solve #18674 by adding the possibility to filter project branches by name

![Screen_Shot_2016-07-07_at_17.21.25](/uploads/b674765d2b1cb8a121c2101715a4568b/Screen_Shot_2016-07-07_at_17.21.25.png)

See merge request !5144
2016-07-25 12:07:29 +00:00
Timothy Andrew 42a00f740b `WikiPage` should have a slug even when not persisted.
1. So we can build the markdown preview URL for it.

2. We can't skip the slug in this case, because the slug is used to
construct relative markdown URLs.

3. Add rspec feature tests to cover creating wiki pages with
   spaces/hyphens in the name.

4. Add rspec feature tests for markdown preview URL rewriting, which was
   only covered by unit tests up to this point.
2016-07-25 09:22:47 +05:30
Scott Le 70ab2f72c6 remove search_id for label dropdown filter 2016-07-24 09:36:08 +08:00
tiagonbotelho 850813d298 Merge branch 'master' into filter-branch-by-name 2016-07-22 21:57:46 +01:00
tiagonbotelho 8f86d93149 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2016-07-21 14:01:05 +01:00
Fatih Acet 479814b292 Merge branch 'fix/new-project-import-tooltip' into 'master'
Show tooltip on GitLab export link in new project page

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

When the project path/name is not filled, we should show a tooltip in the `GitLab export` link, plus a flash message if the user still tries to click on it.

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !5363
2016-07-21 09:52:06 +00:00
Rémy Coutable ed19b9cc43 Merge branch '4142-show-inline-video' into 'master'
Add support for inline videos in issue, MR and notes (on issue, commit, MR, and MR diff)

## What does this MR do?

It adds support for inline videos in issue, MR and notes (on issue, commit, MR, and MR diff). Most of the work was done by @hayesr in !3508 but a few improvements were still missing.

## Why was this MR needed?

To be able to play uploaded videos in GitLab!

## What are the relevant issue numbers?

Closes #4142.

## Screenshots

### Video players

![Screen_Shot_2016-07-19_at_18.44.09](/uploads/e85e531b455a41c3e66b26b356abaafd/Screen_Shot_2016-07-19_at_18.44.09.png)

-----

![Screen_Shot_2016-07-19_at_18.44.29](/uploads/05f52a812760210d1eae86a7f8fc48bc/Screen_Shot_2016-07-19_at_18.44.29.png)

-----

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- Tests
  - [x] Test `VideoLinkFilter`
  - [x] Test in `spec/features/markdown_spec.rb`
  - [x] Improve `spec/uploaders/file_uploader_spec.rb`
  - [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !5215
2016-07-21 07:29:38 +00:00
Rémy Coutable bb6bdbed91 Merge branch 're-deploy-button' into 'master'
Use Re-deploy button on Deployments page

## What does this MR do?
Change `Retry` to `Re-deploy` which is more accurate.

## Are there points in the code the reviewer needs to double check?

## Why was this MR needed?

## What are the relevant issue numbers?
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/18885

## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !5374
2016-07-21 07:21:06 +00:00
Douwe Maan 7c0bf0dc31 Remove flaky diff note tests for now 2016-07-20 18:36:48 -06:00
Kamil Trzcinski c2f77ee00b Use Re-deploy button on Deployments page 2016-07-20 22:48:10 +02:00
Jacob Schatz cfa9ea600d Merge branch 'fix-side-by-side-comment-widget' into 'master'
Fix side by side comment widget

Fixes comment button for empty lines in side by side diff view.

Fixes #19824 
Fixes #19957

See merge request !5262
2016-07-20 17:54:53 +00:00
Rémy Coutable 639942ef01 Merge branch 'issue_8110' into 'master'
Allow slack service to send messages on different channels

closes #8110 

## Allow slack service to send messages on different channels  

![new_slack_service](/uploads/87de0bd6b02a4f7853358676b5e74dff/new_slack_service.png)

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [x] API support added
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !5124
2016-07-20 15:56:06 +00:00
James Lopez 96572bd006 fix spec - unused var 2016-07-20 17:54:50 +02:00
James Lopez 70023c2179 fix spec 2016-07-20 17:12:18 +02:00
Felipe Artur 323d796a0e Refactor service settings view 2016-07-20 12:11:37 -03:00
James Lopez f0603e4cb7 added spec, fixed wording 2016-07-20 16:09:43 +02:00