Commit Graph

1706 Commits

Author SHA1 Message Date
Alex Sanford 317c388347 Ensure labels are loaded on "show" methods of MR
Previously, they were only being loaded on the actual `show` action, but
not the actions representing the tabs (commits, builds, etc).
2016-11-11 14:06:43 -04:00
Douwe Maan 9c9e88da56 Merge branch 'fix/error-when-invalid-branch-for-new-pipeline-used' into 'master'
Fix error when using invalid branch name when creating a new pipeline

## What does this MR do?

This MR fixes `500` error when creating a new pipeline though user interface ("Run pipeline")

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

Is this a good approach to catch those exceptions on `Repository` level?

## Does this MR meet the acceptance criteria?

- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- Tests
  - [x] Added for this feature/bug

## What are the relevant issue numbers?

Closes #23982

See merge request !7324
2016-11-10 14:00:55 +00:00
Douwe Maan b0bf92140f
Merge branch 'fix-unathorized-cloning' into 'security'
Ensure external users are not able to clone disabled repositories.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/23788

See merge request !2017

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-09 12:27:17 +01:00
Hiroyuki Sato 5569573a24 Refactor method name 2016-11-08 05:12:17 +09:00
Grzegorz Bizon c8e8a1bb77 Improve code readability in pipelines controller 2016-11-07 13:33:04 +01:00
Hiroyuki Sato 95a78fb53b Fix bug of json request url 2016-11-07 20:44:15 +09:00
Hiroyuki Sato d8cc8d7adc Remove 'extended_sha1' option from ExtractsPath module 2016-11-06 12:33:39 +09:00
Hiroyuki Sato ee7374a9fb Separete a very long line 2016-11-06 12:05:13 +09:00
Hiroyuki Sato 56264f35d4 Network page appear with an error message when entering nonexistent git revision 2016-11-06 12:05:13 +09:00
Rémy Coutable 86b8fb4e7f Merge branch 'show-status-from-branch' into 'master'
Show pipeline status from branch and commit than only commit

Closes #23615

See merge request !7034
2016-11-04 17:38:25 +00:00
Robert Speicher 920551b585 Merge branch 'rs-merge_request_params' into 'master'
Apply `*_params_ce + *_params_ee` pattern to MergeRequestsController

See merge request !7263
2016-11-04 15:41:48 +00:00
Lin Jen-Shin fb9a0e5277 Merge remote-tracking branch 'upstream/master' into show-status-from-branch
* upstream/master: (35 commits)
  Only skip group when it's actually a group in the "Share with group" select
  Fix: Todos Filter Shows All Users
  Fix: Guest sees some repository details and gets 404
  Move shared params to a helper
  GrapeDSL for project hooks
  Update commits.scss
  updated styling commit SHA on branches page + added to changelog
  change build list height to show 6,5 builds + improve padding of list, with first/last child selectors
  Ignore builds directory from eslint
  Add changelog entry
  Document multiple repository storage paths
  Allow multiple repository storage shards to be enabled, and automatically round-robin between them
  Cleaned up global namespace JS
  Add tip for using Chrome to run and debug teaspoon tests.
  Add CHANGELOG entry file
  Add jquery.timeago.js to application.js
  Update match-regex to fix filename convention
  Move jquery.timeago to vendor directory
  Change a bunch of doc links to either relative or https://docs.gitlab.com.
  Show log corresponding to env in admin/logs
  ...
2016-11-04 22:37:44 +08:00
Robert Speicher 050c8dc7fc Apply `*_params_ce + *_params_ee` pattern to MergeRequestsController 2016-11-04 13:49:47 +00:00
Rémy Coutable 5f1d3ec59a Only skip group when it's actually a group in the "Share with group" select
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-04 12:42:19 +01:00
Lin Jen-Shin 80b5ab5df0 Merge remote-tracking branch 'upstream/master' into show-status-from-branch
* upstream/master: (126 commits)
  Allow to search for user by secondary email address in the admin interface
  Rename :name search parameter to :search_query at /admin/users
  Fix project features default values
  Add a link to the Issue Boards API in main README
  Fix Markdown styling inside reference links
  Fix relative links in Markdown wiki when displayed in "Project" tab
  Flexbox webkit prefixes
  Tests update
  Tests update
  Changed where merge request link is
  New todos blank state
  Implement CreateMembers service to make controller thin
  Do not show tooltip for active element (!7105)
  Update CHANGELOG
  Assign local_assigns[:subject] to a variable on the shared label partial
  Use select instead of pluck on Project.group_ids
  Skip authorization check when searching for labels on IssuableFinder
  Use label subject to calculate number of issues/mrs within the group
  Remove unnecessary includes(:priorities) on Projects::LabelsController
  Add 8.13.2 CHANGELOG entries
  ...
2016-11-02 00:25:35 +08:00
Sean McGivern 51f303967c Merge branch 'refactor_group_members' into 'master'
Implement CreateProjectMembers service to make controller thin

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/23566

See merge request !7170
2016-11-01 13:48:33 +00:00
Valery Sizov 921677782f Implement CreateMembers service to make controller thin 2016-11-01 10:17:04 +02:00
Douglas Barbosa Alexandre 2525e55ec9 Remove unnecessary includes(:priorities) on Projects::LabelsController 2016-10-31 23:27:49 -02:00
Douwe Maan 490776517c Merge branch '22271-drone-tag-pipeline-build' into 'master'
Fix lightweight tags not processed correctly by GitTagPushService

## What does this MR do?

Fix lightweight tags not processed correctly by GitTagPushService

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

No

## Why was this MR needed?

Lightweight tags were being processed incorrectly, causing tag triggers to receive wrong information and not function properly.

## 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 [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] 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)

## What are the relevant issue numbers?


Closes #22271

See merge request !6532
2016-10-31 14:09:39 +00:00
Alejandro Rodríguez fa3bbd449e Fix lightweight tags not processed correctly by GitTagPushService
When we updated gitlab_git to 10.4.1, `tag.target` changed from pointing
to the sha of the tag to the sha of the commit the tag points to. The
problem is that only annotated tags have `object_sha`s, lightweight tags
don't (it's nil), so (only) in their case we still need to use
`tag.target`.
2016-10-28 13:53:18 -03:00
Guilherme Salazar 32913b74b8 add "x of y tasks completed" on issuable
fix issues pointed out in !6527

add task completion status feature to CHANGELOG
2016-10-28 14:01:36 -02:00
Lin Jen-Shin 7cdb238ac5 Merge remote-tracking branch 'upstream/master' into show-status-from-branch
* upstream/master: (65 commits)
  Fixed typo in css class
  Merge branch 'airat/gitlab-ce-23268-fix-milestones-filtering' into 'master'
  Escape quotes in gl_dropdown values to prevent exceptions
  Fixes various errors when adding deploy keys caused by not exiting the control flow.
  Fix typo on /help/ui to Alerts section
  Grapify tags API
  Add 8.13.1 CHANGELOG entries
  Fix sidekiq stats in admin area
  Remove use of wait_for_ajax since jQuery was removed
  Specify which Fog storage drivers are imported by default in backup_restore.md
  Moved avatar infront of labels
  Don't schedule ProjectCacheWorker unless needed
  Fixed height of sidebar causing scrolling issues
  Reduce overhead of LabelFinder by avoiding #presence call
  Fixed users profile link in sidebar Fixed new labels not being created
  Improve redis config tasks for migration paths job
  Ensure search val is defined.
  Ensure cursor is applied to end of issues search input.
  Increase debounce wait on issues search execution.
  Keep the new resque.yml aside and use it once we've checked out master
  ...
2016-10-26 13:24:42 +00:00
Phil Hughes a2eff1a8e5 Merge branch 'master' into issue-board-sidebar 2016-10-26 08:47:09 +01:00
Lin Jen-Shin 13c1859a97 Merge remote-tracking branch 'upstream/master' into show-status-from-branch
* upstream/master: (67 commits)
  Stop unauthized users dragging on issue boards
  Capitalize Git
  Add docker-compose environment initialization command
  Improve readability and add specs for label filtering
  Improve label filtering implementation
  Allow the use of params[:name] when filtering labels
  Fix Rubocop offenses in issue move specs
  Add spec in Issues::MoveService to fix label assignment regression
  Fix bug where labels would be assigned to issues that were moved
  Fix `User#to_reference`
  Fix rubocop build error
  Remove redundant class_name and foreign_key overrides
  Enable SingleLinePerSelector in scss-lint
  Escape ref and path for relative links (!6050)
  Add failing test for #21420
  Enable SpaceAfterVariableColon in scss-lint
  Enable SpaceAroundOperator in scss-lint
  Enable trailingWhitespace in scss-lint
  Disable Rails/Output cop since it makes no sense here
  Use File.write instead of File.open + File#write
  ...
2016-10-25 22:40:14 +08:00
Lin Jen-Shin 5416d0e083 Pass `@ref` along so we know which pipeline to show
Closes #23615
2016-10-24 22:26:06 +08:00
Dmitriy Zaporozhets 7ded7c17d4 Update project member controller to match recent master logic
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-10-24 13:14:00 +03:00
Dmitriy Zaporozhets f5659ac4d1 Add parentheses around return redirect_to method
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-10-24 13:14:00 +03:00
Dmitriy Zaporozhets c82278898d Refactor groups/projects members controller
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-10-24 13:14:00 +03:00
Linus G Thiel 036fac06d1 Gracefully handle adding of no users to projects and groups
- Disable {project, group} members submit button if no users

  If no users are selected, the submit button should be disabled.

- Alert user when no users were added to {project, group}.

  When no users were selected for adding, an alert message is
  flashed that no users were added.

- Also, this commit adds a feedback when users were actually added to a
  project, in symmetry with how group members are handled.

Closes #22967, #23270.
2016-10-24 13:14:00 +03:00
Douwe Maan 030c82267f Merge branch '23341-fix-viewing-mr-from-deleted-project' into 'master'
Fix a 500 error viewing an MR with a deleted source project

## What does this MR do?

Allows merged MRs to be shown without any 500 errors if the source project is removed

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

31c37c6c38 fixed this for closed MRs only. I had trouble understanding the introduced helper and logic, so reverted it and keyed everything on the existence of the source project or branch directly.

commits.json returns a 500 error for a closed or merged MR; the approach taken in the above MR was to hide the commits... tab, so I've run with that.

For merged MRs, the commits (but not the pipeline data) are in the target project, so we *could* do better, but it's a fairly nasty intervention to make it happen.

## Why was this MR needed?

Viewing merged MRs should work even if the fork they came from has been deleted or unlinked.

## Screenshots (if relevant)

![Screen_Shot_2016-10-19_at_17.56.37](/uploads/1aeadd5147b9a4ad29b946b1c7ea52cb/Screen_Shot_2016-10-19_at_17.56.37.png)

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) 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
  - [ ] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [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 it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

Closes #23341

See merge request !6991
2016-10-20 14:03:10 +00:00
Dmitriy Zaporozhets 9180bdd445 Merge branch 'remove-unused-code-project-members-controller' into 'master'
Removed code from project members controller

## What does this MR do?

Removes code that was meant to be added to a different branch as an experiment.

See merge request !7012
2016-10-20 12:07:57 +00:00
Nick Thomas 6f846fcbe8 Fix two CI endpoints for MRs where the source project is deleted 2016-10-20 12:24:27 +01:00
Nick Thomas 374071321d Fix the merge request view when source projects or branches are removed 2016-10-20 12:24:27 +01:00
Sean McGivern 6f875903a0 Merge branch 'refactoring_find_commits_method' into 'master'
Refactoring find_commits method

It's possible that `find_commits_by_message` return nil in array which is not OK. We have different checks outside of this method. This MR places all checks inside the method.

See merge request !7000
2016-10-20 10:43:33 +00:00
Phil Hughes 50288a6ace Removed code from project members controller
This code was meant to be added to another branch as an expirement, but instead was commited to wrong branch
2016-10-20 11:35:29 +01:00
Valery Sizov fd2c3a3da0 Refactoring find_commits functionality 2016-10-20 12:45:34 +03:00
Phil Hughes fcf0a4a12d Merge branch 'master' into issue-board-sidebar 2016-10-19 22:33:34 +01:00
Douglas Barbosa Alexandre 007267ef8b Use `includes(:priorities)` on Projects::LabelsController 2016-10-19 14:58:27 -02:00
Douglas Barbosa Alexandre 530aae9080 Abstract LabelPriority away into methods on Label model 2016-10-19 14:58:27 -02:00
Douglas Barbosa Alexandre 86e0b5d643 Fix issue board related controllers to expose label priority per project 2016-10-19 14:58:27 -02:00
Douglas Barbosa Alexandre 67314e95ae Add support to group labels prioritization on project level 2016-10-19 14:58:27 -02:00
Douglas Barbosa Alexandre 6792644ae7 Use present? instead of presence on Projects::IssuesController#index 2016-10-19 14:58:26 -02:00
Douglas Barbosa Alexandre 247859c829 Render all available labels to project on project labels dropdown 2016-10-19 14:58:26 -02:00
Douglas Barbosa Alexandre bde992a83a Limit what label fields we expose on Projects::LabelsController#index 2016-10-19 14:58:26 -02:00
Douglas Barbosa Alexandre 933ebb8f9b Use present? instead of presence on Projects::MergeRequestsController 2016-10-19 14:58:26 -02:00
Douglas Barbosa Alexandre 0bfa39d5bd Remove scopes/types for labels 2016-10-19 14:58:25 -02:00
Douglas Barbosa Alexandre 1c73d302e2 Avoid an extra a query per label when setting label priority 2016-10-19 14:58:24 -02:00
Douglas Barbosa Alexandre baf47a0bd0 Remove project_labels from Projects::ApplicationController 2016-10-19 14:58:24 -02:00
Douglas Barbosa Alexandre bdb7bf4b51 List group labels on project labels page 2016-10-19 14:58:24 -02:00
Douglas Barbosa Alexandre bf9d928b45 Allow user to create a board list based on a group label 2016-10-19 14:58:24 -02:00