Commit Graph
7462 Commits
Author SHA1 Message Date
Dmitriy Zaporozhets 46d0f8f183 Fix tests 2015-03-03 22:04:25 -08:00
Dmitriy Zaporozhets 9156882f89 Improve GitLab EE appearance
* Fix bug with redirect to image logo after login
* Use one (light) logo for header
* Improve header logo preview
* Dont require authentication for appearance images
2015-03-03 22:04:25 -08:00
Dmitriy Zaporozhets d997890270 Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into ce-to-ee 2015-03-03 21:30:52 -08:00
Marin Jankovski 66fa4b09ed Merge branch 'fix-edit-note-with-votes' into 'master'
Fix server error when editing a note to "+1" or "-1"

### Summary

If a user edits a comment with "+1" or "-1" in the beginning, the POST returns an Internal Server error. (issue #1151). This merge request resolves that error.

### Steps to reproduce

1. Comment on an issue with "Test comment".
2. Edit the issue.
3. Write "+1" and click "Save Comment".

### Expected behavior

The edited note should be saved and refreshed. Any previous upvotes/downvotes from the user should contain a strikethrough.

### Observed behavior

Internal Error

### Relevant logs

```
Started PUT "/avocode/avocode-manager/notes/4996" for 185.33.136.107 at 2015-02-28 17:11:53 +0100
Processing by Projects::NotesController#update as JS
Parameters: {"utf8"=>"✓", "authenticity_token"=>"*removed*", "note"=>{"note"=>"+1\r\n\r\nYes"}, "commit"=>"Save Comment", "project_id"=>"avocode/avocode-manager", "id"=>"4996"}
Completed 500 Internal Server Error in 86ms
ActionView::Template::Error (undefined method `each' for nil:NilClass):
28: %span.note-last-update
29: = note_timestamp(note)
30:
31: - if note.superceded?(@notes)
32: - if note.upvote?
33: %span.vote.upvote.label.label-gray.strikethrough
34: %i.fa.fa-thumbs-up
app/models/note.rb:495:in `superceded?'
app/views/projects/notes/_note.html.haml:31:in `_app_views_projects_notes__note_html_haml___812277000516355462_69988235638820'
app/controllers/projects/notes_controller.rb:71:in `note_to_html'
app/controllers/projects/notes_controller.rb:103:in `render_note_json'
app/controllers/projects/notes_controller.rb:39:in `block (2 levels) in update'
app/controllers/projects/notes_controller.rb:38:in `update'
```

### Fix

It turns out no tests were present for the "Edit Issue" functionality. I added spinach tests to exercise this and reproduced the error.

Most of the routes in `notes_controller.rb` appear to render all notes for the given discussion. `_form.html.haml` needs the full list of notes commented by the user to add strikethroughs for older upvotes/downvotes. However, only the `index` route appeared to obtain this information. The fix is to add a `before_filter` to obtain all the user's notes beforehand, except in the delete case where this information is not needed.

Things to watch: `NotesFinder` needs `target_type` and `target_id` to determine what to do. I'm not sure if there is a conscious effort to phase these keywords out in favor of `noteable_type` and `noteable_id`.

See merge request !360
2015-03-03 21:57:00 +00:00
Dmitriy Zaporozhets 811505c7ce Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into ce-to-ee
Conflicts:
	app/controllers/projects/team_members_controller.rb
	app/views/groups/members.html.haml
2015-03-03 13:33:40 -08:00
Marin Jankovski a7fad44bd3 Merge branch 'go-import' into 'master'
Render go-import meta tag for private repos.

The previously solution (626f5bab35) required a change to nginx config and broke visits from Googlebot and other clients including "go" in their user agent.

See merge request !1587
2015-03-03 19:53:20 +00:00
Marin Jankovski e6a0fb1f77 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-03-03 11:50:21 -08:00
Dmitriy Zaporozhets 911649b6eb Merge branch 'remove_duplicate_settings_link' into 'master'
Remove duplicate Settings link in admin area.

Fixes #250

See merge request !330
2015-03-03 19:21:55 +00:00
Dmitriy Zaporozhets d5d19a9fae Merge branch 'user-select-unassigned' into 'master'
Don't show Unassigned in user select when searching.

Fixes #2056.

When a search term is present, the Unassigned item isn't rendered, so the highlighted item is the first search result and hitting Enter works as expected.

See merge request !1620
2015-03-03 19:08:57 +00:00
Hannes Rosenögger 10212c01fd Count commits in branches as well in the commit calendar 2015-03-03 15:31:05 +01:00
Douwe Maan 3102454a56 Don't show Unassigned in user select when searching. 2015-03-03 13:52:13 +01:00
Douwe Maan 3702c4ad80 Render go-import meta tag for private repos. 2015-03-03 11:22:30 +01:00
Douwe Maan d513ca584a Revert "Merge branch 'go-get-workaround-nginx' of https://github.com/mattes/gitlabhq into mattes-go-get-workaround-nginx"
This reverts commit 51349ca3c8, reversing
changes made to b180476bd6.
2015-03-03 11:21:48 +01:00
Dmitriy Zaporozhets f438791721 Fix import check for case sensetive namespaces 2015-03-02 23:06:59 -08:00
Dmitriy Zaporozhets 16e899ca8b Add brakeman rake task and improve code security 2015-03-02 18:11:50 -08:00
Dmitriy Zaporozhets 704d21f517 Merge branch 'cirosantilli-link-to-button' into 'master'
Cirosantilli link to button

For https://github.com/gitlabhq/gitlabhq/pull/7912

See merge request !1614
2015-03-03 00:46:44 +00:00
Dmitriy Zaporozhets 8dcffdcdc1 Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into ce-to-ee
Conflicts:
	app/helpers/oauth_helper.rb
	app/helpers/projects_helper.rb
	app/models/service.rb
	app/views/devise/shared/_signin_box.html.haml
	config/gitlab.yml.example
	db/schema.rb
	doc/integration/github.md
	features/project/service.feature
	lib/gitlab/github_import/client.rb
2015-03-02 16:10:12 -08:00
Dmitriy Zaporozhets 3cc55fe4fe Merge branch 'master' of github.com:gitlabhq/gitlabhq 2015-03-02 15:30:52 -08:00
Dmitriy Zaporozhets 3087be1be7 Merge branch 'less-sql-queries' into 'master'
Reduce amount of sql queries on dashboard projects page

For https://github.com/gitlabhq/gitlabhq/issues/7218

See merge request !1613
2015-03-02 23:30:27 +00:00
Dmitriy Zaporozhets 519ca7bae9 Merge branch 'link-to-button' of https://github.com/cirosantilli/gitlabhq into cirosantilli-link-to-button
Conflicts:
	app/views/shared/_issuable_filter.html.haml
2015-03-02 15:28:22 -08:00
Stan Hu b8c9257fb1 Fix bug where editing a comment with "+1" or "-1" would cause a server error
Closes #1151
2015-03-02 15:26:00 -08:00
Dmitriy Zaporozhets 7faae7c163 Merge pull request #8092 from cirosantilli/factor-finder-perms
Factor permission check in issuable finder
2015-03-02 15:24:59 -08:00
Dmitriy Zaporozhets 33e107127a Merge pull request #8812 from opichals/teamcity_branchName_not_to_be_whole_ref
Fix for TeamCity buildQueue REST API build/@branchName.
2015-03-02 15:23:15 -08:00
Dmitriy Zaporozhets f00feb14ec Merge branch 'add-irker-service' of https://github.com/Aorimn/gitlabhq into Aorimn-add-irker-service
Conflicts:
	app/controllers/projects/services_controller.rb
2015-03-02 15:22:31 -08:00
Dmitriy Zaporozhets 12581f15ee Merge pull request #7473 from sodabrew/patch-1
Improve login screen when only OmniAuth providers are enabled
2015-03-02 15:18:59 -08:00
Dmitriy Zaporozhets e39bf83770 Merge pull request #8501 from AKoetsier/slack_channel_and_username
Allow a user to specify a channel and username for the slack-webhook
2015-03-02 15:17:56 -08:00
Dmitriy Zaporozhets c0828d6fcd Merge branch '7-9-pre' into 'master'
Recent changes from CE master

See merge request !325
2015-03-02 22:56:40 +00:00
Dmitriy Zaporozhets f84bd771d4 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-03-02 14:55:45 -08:00
Dmitriy Zaporozhets c530ca00b0 Merge branch 'fix-protected-branches-routing' into 'master'
Fix protected branches routing

### Summary

On the master branch, if you attempt to access the protected branches in the project settings with an empty repo, you get `NoMethodError - undefined method "project_url"`.

### Steps to reproduce

1. Check out GitLab master and run.
2. Create a new project.
3. Go to Settings.
4. Click on "Protected branches"

### Expected behavior

The controller is supposed to redirect back to the projects page since there are no branches.

### Observed behavior

Internal Error 500

### Relevant logs

```
NoMethodError - undefined method `project_url' for #<Projects::ProtectedBranchesController:0x007fd920054af0>:
  app/controllers/application_controller.rb:157:in `method_missing'
  actionpack (4.1.9) lib/action_dispatch/routing/polymorphic_routes.rb:142:in `polymorphic_url'
  actionpack (4.1.9) lib/action_dispatch/routing/url_for.rb:161:in `url_for'
  actionpack (4.1.9) lib/action_controller/metal/redirecting.rb:91:in `_compute_redirect_to_location'
  turbolinks (2.0.0) lib/turbolinks.rb:15:in `_compute_redirect_to_location_with_xhr_referer'
  actionpack (4.1.9) lib/action_controller/metal/redirecting.rb:71:in `redirect_to
```

### Fix

I added a unit test for the empty project case and replicated the issue. I added the URL router helpers that appear to be necessary after 42387b733b.

See merge request !359
2015-03-02 22:39:28 +00:00
Dmitriy Zaporozhets 27e7534470 Merge pull request #8829 from ZeoAlliance/merge_request_diff_view_fix
[bugfix] Merge request diff view behaviour fix
2015-03-02 14:28:21 -08:00
Dmitriy Zaporozhets 643afcbe00 Reduce amount of sql queries on dashboard projects page 2015-03-02 14:02:09 -08:00
Dmitriy Zaporozhets ed3bd155fc Merge branch 'master' of github.com:gitlabhq/gitlabhq 2015-03-02 13:45:46 -08:00
Marin Jankovski dae8f2faeb Merge branch 'create_issue_header' into 'master'
New Issue Header

Fixes #2073

- I've switched it from "New Issue" to "Create Issue". Small change, but grammatically correct.

See merge request !1611
2015-03-02 20:58:38 +00:00
Stan Hu 4bc5c66fe1 Fix broken project_url routing when protected branches are accessed with an empty repo 2015-03-01 20:26:21 -08:00
Aorimn f84b7eef3f Add Irker service
Irker is a gateway which sends IRC messages on git updates. This new
service provides an interface to this gateway, integrated in Gitlab, for
each updates.
As per the guidelines, this commit adds the new feature in the
CHANGELOG, tests and documentation.

See http://www.catb.org/esr/irker/
2015-03-01 20:51:03 +01:00
Jeroen van Baarsen 93bacb03e5 Merge pull request #8890 from sue445/feature/project_api_avatar_url
Expose avatar_url in projects API
2015-03-01 10:54:42 +01:00
sue445 51abeaa1bc Expose avatar_url in projects API
* Impl Project#avatar_url
* Refactor ApplicationHelper: Use Project#avatar_url
* Update changelog
2015-03-01 10:13:01 +09:00
Andrès Koetsier d2c85a68bb Allow a user to specify a channel and username for the slack-webhook 2015-02-28 10:06:32 +01:00
Robert Schilling 82a9a4c034 Merge pull request #8882 from Shine-neko/master
Fix typo
2015-02-28 07:48:46 +01:00
Vinnie Okada 067a5b9d8b Update path helpers and routes for Rails 4.1.9
Update project path helpers and routes to reflect the new nested
resources introduced in the Rails 4.1.9 upgrade.
2015-02-27 18:21:15 -07:00
Sabba Petri a41b9533fe Changed to "Create Issue" 2015-02-27 16:24:05 -08:00
Sabba Petri df2353716b Changed header to Create New Issue 2015-02-27 16:22:53 -08:00
Marin Jankovski 215bfcf7ed Remove duplicate Settings link in admin area. 2015-02-27 14:12:05 -08:00
Mlanawo Mbechezi 9e4d3f328f fix typo 2015-02-27 22:49:40 +01:00
Dmitriy Zaporozhets ada7d0f393 Merge branch 'update_update_project_milestone_path' into 'master'
Update project_milestone_path update route.

See merge request !1605
2015-02-27 17:41:04 +00:00
Douwe Maan 804a2488cf Fix and test User#contributed_projects_ids. 2015-02-27 10:49:47 +01:00
Dmitriy Zaporozhets 47c5a2ab22 Merge branch 'autocomplete-mention-count' into 'master'
Include number of affected people in all/group mention autocomplete item.

As mentioned in #2054.

To minimize misuse of all/group mentions, the autocomplete title includes the number of members this mention will notify, so users will be more considerate what groups they mention.

Example:

at-all "**all** All Project and Group Members (12)"

at-gitlab "**gitlab** GitLab (12)"

See merge request !1596
2015-02-27 07:08:23 +00:00
Dmitriy Zaporozhets 42387b733b Merge branch 'route-helper' into 'master'
Introduce shortcuts for routing helpers

See merge request !1600
2015-02-27 07:03:01 +00:00
Dmitriy Zaporozhets 6ac0a0217c Fix syntax issue 2015-02-26 16:44:52 -08:00
Marin Jankovski 62a81494ba Update project_milestone_path update route. 2015-02-26 16:03:42 -08:00