Commit Graph
1604 Commits
Author SHA1 Message Date
Dmitriy Zaporozhets 309f588d56 Merge branch 'fix-encoding' into 'master'
Minor cleanup around UTF-8 encoding.

Minor cleanup to be merged after https://dev.gitlab.org/gitlab/gitlab_git/merge_requests/24 is merged in.

See merge request !1642
2015-03-13 16:50:53 +00:00
Douwe Maan 12b779e70b Move tag deletion to service and execute hooks and services. 2015-03-13 16:07:08 +01:00
Douwe Maan 7f4cffd88b Reuse blob object fetched by Gitlab::Git::Blame. 2015-03-13 13:49:27 +01:00
Douwe Maan f96dc6295a Everything from gitlab_git is already UTF-8. 2015-03-13 13:49:27 +01:00
Dmitriy Zaporozhets ec02cdf205 Merge branch 'master' into mr-filter-by-title
Conflicts:
	app/controllers/projects/merge_requests_controller.rb
2015-03-12 16:29:03 -07:00
Dmitriy Zaporozhets 80b2f3fb86 Implement merge requests search
It is same search like we have at issues page. It allows to quickly
filter merge requests based on title or desription. I copy-pasted some
js code from Issues.js. In future search (filtering) logic should be
refactoed into one class for merge requests and issues
2015-03-12 16:20:58 -07:00
Dmitriy Zaporozhets f0cbbd70bb Use same constant for amount of items per page 2015-03-12 15:37:00 -07:00
Dmitriy Zaporozhets 1065f3d30b Merge branch 'github-org-repos' into 'master'
Fix missing GitHub organisation repositories on import page.

Private repositories belonging to organizations rather than users can't be imported because `client.repos(org.login)` was requesting `/users/:org_login/repos` (which only returns public org repo's), while we need `/orgs/:org_login/repos` (which includes both public and private). The `client.org_repos` method does this.

cc @marin This is a bug in 7.8.x, but I'm not sure if it needs a minor release now or if it can go in 7.9.

See merge request !1683
2015-03-12 17:13:25 +00:00
Valery Sizov 0b38c3e041 group controller refactoring 2015-03-12 17:08:48 +02:00
Douwe Maan 3175438f02 Fix missing GitHub organisation repositories on import page. 2015-03-12 13:47:15 +01:00
Dmitriy Zaporozhets c02d891cb5 Merge branch 'master' into new-emoji
Conflicts:
	Gemfile.lock
2015-03-11 18:02:37 -07:00
Dmitriy Zaporozhets 5f40253f76 Remove annoying notice messages when create/update merge request 2015-03-11 16:07:33 -07:00
Dmitriy Zaporozhets d2d709a252 Update html-pipeline and emoji 2015-03-11 16:05:01 -07:00
Dmitriy Zaporozhets 4b1bb42bf7 Fix tests for project removing 2015-03-10 21:56:19 -07:00
Dmitriy Zaporozhets 0414b2ae98 Remove projects page from dashboard 2015-03-10 16:03:37 -07:00
Dmitriy Zaporozhets 83f7e98d9a Add project filter by visibility and tag to explore page 2015-03-10 15:59:14 -07:00
Dmitriy Zaporozhets 7fd4dc1e11 Remove group rendering from dashboard page 2015-03-10 13:17:16 -07:00
Dmitriy Zaporozhets 961971544a Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-03-10 12:03:58 -07:00
Dmitriy Zaporozhets 828519ba05 Merge branch 'fix_importers' into 'master'
Fix importers with OCC

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

Using validates_uniqueness_of does not guarantee the absence of duplicate record insertions. When users click button "import all" it will create duplicating group in database and data integrity will be broken.

http://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html#method-i-validates_uniqueness_of

I use optimistic concurrency control for handling this situation.

See merge request !1647
2015-03-10 19:01:05 +00:00
Dmitriy Zaporozhets 0fa4d0929d Merge branch 'uploads-authorization' into 'master'
Reject access to group/project avatar if the user doesn't have access.

Closes #2050.

I'll add tests for EE logos once this is merged here and merged into EE.

See merge request !1671
2015-03-10 18:20:46 +00:00
Douwe Maan f5e42f602f Reject access to group/project avatar if the user doesn't have access. 2015-03-10 17:13:02 +01:00
Douwe Maan 383c56efa1 Use Gitlab::Git helper methods and constants as much as possible. 2015-03-10 13:39:31 +01:00
Hannes Rosenögger 332413d7c4 Merge branch 'fix-import-redirect' into 'master'
Fixing import redirect loop

While importing, don't redirect import actions to the project page, even if the repository exists

Fixes #1191

See merge request !379
2015-03-10 10:58:35 +00:00
Valery Sizov ed4c7190ed Fix importers with OCC 2015-03-10 12:23:11 +02:00
DJ Mountney 23fabc081d Fixing import redirect loop
While importing, don't redirect import actions to the project page, even if the repository exists
2015-03-09 16:36:41 -07:00
Dmitriy Zaporozhets b51e2a0559 Merge branch 'starred-projects' into 'master'
Add starred projects page to dashboard

For #1836 and #2069

See merge request !1659
2015-03-09 23:26:58 +00:00
Dmitriy Zaporozhets d36ee3190a Add starred projects page to dashboard 2015-03-09 14:12:03 -07:00
Dmitriy Zaporozhets dd24c3d4b9 Improve user block/unblock UI in admin area 2015-03-09 13:02:06 -07:00
Dmitriy Zaporozhets 9b3e156e43 Move profile groups page to dashboard 2015-03-08 17:03:30 -07:00
Dmitriy Zaporozhets 8b551ee318 Merge branch 'emails-on-push'
Conflicts:
	app/controllers/projects/services_controller.rb
	app/models/project_services/emails_on_push_service.rb
2015-03-08 16:49:11 -07:00
Dmitriy Zaporozhets cec2be2d76 Merge branch 'fix-milestone-list-width' into 'master'
Fix width of text in milestone lists and add assignee icon to merge requests.

Before:

![Screen_Shot_2015-03-06_at_13.48.00](https://dev.gitlab.org/gitlab/gitlabhq/uploads/5754638a3ebb79dee1f6c07a6e268035/Screen_Shot_2015-03-06_at_13.48.00.png)

After:

![Screen_Shot_2015-03-06_at_13.48.14](https://dev.gitlab.org/gitlab/gitlabhq/uploads/fe92adf387964efb3d460dfc61ced3b8/Screen_Shot_2015-03-06_at_13.48.14.png)

I've checked with other screen widths as well, and it looks good all the time.

See merge request !1645
2015-03-08 23:41:26 +00:00
Dmitriy Zaporozhets b5c3e1a431 Add GitLab UI development kit 2015-03-08 14:46:22 -07:00
Dmitriy Zaporozhets 3cf4359b00 Merge branch 'mass-change-comments' into 'master'
Send notifications and leave system comments when bulk updating issues.

Resolves https://dev.gitlab.org/gitlab/gitlabhq/issues/1885.

See merge request !1646
2015-03-07 01:06:44 +00:00
Stan Hu 7e204cf389 Added comment notification events to HipChat and Slack services.
Supports four different event types all bundled under the "note" event type:

- comments on a commit
- comments on an issue
- comments on a merge request
- comments on a code snippet
2015-03-06 06:54:00 -08:00
Douwe Maan b673d87227 Send notifications and leave system comments when bulk updating issues. 2015-03-06 15:01:13 +01:00
Douwe Maan be94e13552 Add assignee icon to milestone merge requests. 2015-03-06 14:08:40 +01:00
Dmitriy Zaporozhets 65105ff3bb Improve projects list
* Add search filtering for group projects
* Show all user projects on dashboard
* Refactor projects list into one view
* Hide big list of projects with 'Show all' button
2015-03-04 17:22:55 -08:00
Dmitriy Zaporozhets 63178a9509 Merge branch 'add-more-slack-notifications' into 'master'
Add more Slack notifications for issue and merge request events

From https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/237 by Stan Hu.

See merge request !1556
2015-03-04 21:57:17 +00:00
Dmitriy Zaporozhets e916f1c295 Merge branch 'dashboard-milestones' into 'master'
Add dashboard milestones.

Closes #1422.

![Screen_Shot_2015-03-03_at_16.20.36](https://dev.gitlab.org/gitlab/gitlabhq/uploads/795b480a2552e1d26436c3db2158cb81/Screen_Shot_2015-03-03_at_16.20.36.png)

See merge request !1621
2015-03-04 19:12:47 +00: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
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
Douwe Maan fbc3cb69c3 Add dashboard milestones. 2015-03-03 16:19:37 +01:00
Douwe Maan 3702c4ad80 Render go-import meta tag for private repos. 2015-03-03 11:22:30 +01:00
Stan HuandDouwe Maan afe5d7d209 Issue #595: Support Slack notifications upon issue and merge request events
1) Adds a DB migration for all services to toggle on push, issue, and merge events.

2) Upon an issue or merge request event, fire service hooks.

3) Slack service supports custom messages for each of these events. Other services
not supported at the moment.

4) Label merge request hooks with their corresponding actions.
2015-03-03 11:14:31 +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 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
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 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 643afcbe00 Reduce amount of sql queries on dashboard projects page 2015-03-02 14:02:09 -08:00