Commit Graph

452 Commits

Author SHA1 Message Date
Artem Sidorenko 3ebbed25f0 Allow listing of archived projects
Resolves #9285
2015-08-19 13:46:59 +02:00
Dmitriy Zaporozhets 3e259ea8bc Revert "Merge branch 'revert-satellites' into 'master' "
This reverts commit 5daf44b7c8, reversing
changes made to 2f706fbd23.
2015-08-11 14:33:31 +02:00
Dmitriy Zaporozhets 9f10943c1a
Revert "Merge branch 'drop-satellites'"
This reverts commit 957e849f41, reversing
changes made to 6b9dbe9f5a.

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-11 10:28:42 +02:00
Dmitriy Zaporozhets b48b07044b
Merge branch 'master' into drop-satellites
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-04 16:42:36 +02:00
Atsushi Ishida f33898ecfb Re-annotate models 2015-08-03 01:52:54 +09:00
Robert Speicher a876db48d9 Merge branch 'api-new-attributes' into 'master'
Add project star and fork count, group avatar URL and user/group web URL attributes to API

Addresses internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2521.

See merge request !1058
2015-07-30 21:38:48 +00:00
Douwe Maan 2a60b8006b Fix Project 2015-07-30 12:35:09 +02:00
Douwe Maan b8066e2cd0 No more web url 2015-07-30 11:56:15 +02:00
Stan Hu 3e9b612306 Check that project was actually created rather than just validated in import:repos task
Add gitlab-shell to error message to give user a clue that something may be wrong there.

Ran into this in #2082. User was told that repositories were created when they were
not due to hooks symlink being wrong.
2015-07-29 10:49:13 -07:00
Douwe Maan 72c552c2d4 Fix specs 2015-07-29 13:23:28 +02:00
Douwe Maan 05cca9342b Use URL helpers 2015-07-29 12:03:53 +02:00
Dmitriy Zaporozhets f0116f1335
Store commit count in project table
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-17 15:22:56 +02:00
Dmitriy Zaporozhets a87989fb7d Remove satellites 2015-07-15 15:45:57 +02:00
zenati b0de6e9ae2 An `in_namespace` scope is already present 2015-06-09 13:42:01 +02:00
Robert Speicher b88da58cb6 Add `reference_pattern` to Referable models 2015-05-26 15:48:32 -04:00
Robert Speicher c0faf91ff2 Add `to_reference` for models that support references
Now there is a single source of information for which attribute a model
uses to be referenced, and its special character.
2015-05-26 15:48:30 -04:00
Hannes Rosenögger 1dd0caf4d9 Merge branch 'fix-avatar-removal' into 'master'
Fix bug where avatar filenames were not actually deleted from the database during removal

This would result in a 404 error in certain views.

The `save` call was being rolled back due to an error in the validation step.
Relax the validation step so that this works.

Closes #1570

See merge request !620
2015-05-12 14:46:58 +00:00
bugagazavr acac788902 Added X-GitLab-Event header for web hooks 2015-05-08 16:49:03 +03:00
Stan Hu bf4b438459 Fix bug where avatar filenames were not actually deleted from the database during removal.
This would result in a 404 error in certain views.

The `save` call was being rolled back due to an error in the validation step.
Relax the validation step so that this works.

Closes #1570
2015-05-07 10:00:35 -07:00
Robert Speicher 99fcf2e6fe Improve/add specs for `Project#get_issue` and `#issue_exists?` 2015-05-01 13:29:36 -04:00
Robert Speicher 66a3c4280d Change `external_issue_tracker.blank?` to `!external_issue_tracker` 2015-04-30 17:27:51 -04:00
Robert Speicher 0027c2ddd7 Add Project#get_issue 2015-04-30 16:35:27 -04:00
Valery Sizov bc9ba5237c Revert "Added X-GitLab-Event header for web hooks"
This reverts commit 548f182814.
2015-04-27 16:29:31 +03:00
Dmitriy Zaporozhets 278c3ba401 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-04-27 11:38:36 +03:00
bugagazavr 548f182814 Added X-GitLab-Event header for web hooks 2015-04-25 21:31:52 +03:00
Douwe Maan 0cf76a0b70 Use Projects::CreateService to fork projects so that after-create hooks are run. 2015-04-24 22:58:27 +02:00
Douwe Maan 8ed7ac9d44 Use project.commit convenience method. 2015-04-24 12:29:36 +02:00
Douwe Maan 84a1590252 Let commit model know about its project. 2015-04-24 12:29:36 +02:00
Douwe Maan 7d98c8842d Move import data out of project so it doesn't take ages to load. 2015-04-17 14:49:00 +02:00
Douwe Maan 63b21945d2 Merge branch 'google-code-import' into 'master'
Import projects from Google Code.

Resolves #1257.

Issue import logic almost entirely taken from https://gitlab.com/o9000/google-code-to-gitlab ( ♥️ @o9000).

### To do

- [x] List projects from Google Takeout file
- [x] Import Git repository
- [x] Import issues
- [x] Link to correct attachment URL (https://code.google.com/p/support-tools/issues/detail?id=50)
- [x] Handle deleted attachments
- [x] Handle blockedOn attribute
- [x] Add directions on how to get data from Google Takeout

### Import instructions

![Screen_Shot_2015-04-03_at_16.02.21](https://gitlab.com/gitlab-org/gitlab-ce/uploads/4a87038035fbad9441cf613b8cdcc690/Screen_Shot_2015-04-03_at_16.02.21.png)

### Imported issue

![Screen_Shot_2015-04-03_at_16.25.49](https://gitlab.com/gitlab-org/gitlab-ce/uploads/b2c2eaf5ecfcf57b3c48511eb5d26db4/Screen_Shot_2015-04-03_at_16.25.49.png)

See merge request !471
2015-04-15 06:53:42 +00:00
Dmitriy Zaporozhets 8d9d63b250 Merge branch 'arbitrary-local-repo-import' into 'master'
Prevent arbitary local repos from being imported.

Fixes gitlab/gitlab-ee#263.

See merge request !1763
2015-04-12 10:21:15 +00:00
Robert Speicher 307962a046 Rename last uses of Buildbox to Buildkite 2015-04-11 14:05:22 -04:00
Douwe Maan cebb74a0c0 Fix project import URL regex to prevent arbitary local repos from being imported. 2015-04-11 11:37:58 +02:00
Douwe Maan 7b5bc32cad Allow projects to be imported from Google Code. 2015-04-03 15:29:27 +02:00
Douwe Maan dfe0f9eedf Use more specific regexes. 2015-03-27 11:09:29 +01:00
Dmitriy Zaporozhets 63d0bf1f5e Fix external wiki service 2015-03-17 22:59:45 -07:00
Dmitriy Zaporozhets 52acd2b45c Merge branch 'external_wiki' into 'master'
Add support for external wikis

## What does this MR do?
This MR adds the possibility to replace the link to the internal wiki of gitlab with a custom link.
Currently this is realised as a service.

## What Use Case does this MR solve?
In my Company we already have a wiki System (Confluence).
We have a policy to use the existing wiki, so we can't switch to the internal wiki Gitlab provides.
This currently only leaves us two choices:
1. Disable the gitlab wiki. That means we completly loose the connection between wiki and code from the gitlab ui.
2. Create a simple wiki page with a link to our external wiki and hope that no one uses the internal one.

Both solutions are not really good.
So what can be done to improve the situation while making it as easy as possible for new developers to access both, wiki and gitlab?
Replacing the wiki link kinda like the JIRA integration replaces the issues link looks like a good first step to me. :)
This can probably be extended later to completly prevent access to the internal wiki (currently that's still possible if you know the link) or maybe to check if the link really points to a wiki.

## Screenshot:
![external_wiki_service](https://gitlab.com/uploads/gitlab-org/gitlab-ce/89b27cf068/external_wiki_service.png)

See merge request !291
2015-03-18 02:00:36 +00:00
Dmitriy Zaporozhets 648f38cd98 Merge branch 'fix-restricted-visibility' into 'master'
Restricted visibility levels - bug fix and new feature

This allows admin users to override restricted visibility settings when creating and updating projects and snippets, and moves the restricted visibility configuration from gitlab.yml to the web UI.  See #1903.

## Move configuration location

I added a new section to the application settings page for restricted visibility levels.  Each level has a checkbox, styled with Bootstrap to look like a toggle button.  A checked box means that the level is restricted.  I added a glowing text shadow and changed the background color for checked buttons because the default styles made it hard to distinguish between checked and unchecked.  This image shows the new section with the "Public" box checked:

![restricted_visibility_settings](https://dev.gitlab.org/Okada/gitlabhq/uploads/629562e4313f89b795e81c3bb0f95893/restricted_visibility_settings.png)

## Allow admins to override

To allow admin users to override the restricted visibility levels, I had to remove the `visibility_level` validation from the `Project` class.  The model doesn't know about the `current_user`, which should determine whether the restrictions can be overridden.  We could use the creator in the validation, but that wouldn't work correctly for projects where a non-admin user is the creator and an admin tries to change the project to a restricted visibility level.

The `Project::UpdateService` and `Project::CreateService` classes already had code to determine whether the current user is allowed to use a given visibility level; now all visibility level validation is done in those classes.  Currently, when a non-admin tries to create or update a project using a restricted level, these classes silently set the visibility level to the global default (create) or the project's existing value (update).  I changed this behavior to be more like an Active Model validation, where using a restricted level causes the entire request to be rejected.

Project and personal snippets didn't have service classes, and restricted visibility levels weren't being enforced in the model or the controllers.  The UI disabled radio buttons for restricted levels, but that wouldn't be difficult to circumvent.  I created the `CreateSnippetService` and `UpdateSnippetService` classes to do the same restricted visibility check that the project classes do.  And since I was dealing with snippet visibility levels, I updated the API endpoints for project snippets to allow users to set and update the visibility level.

## TODO

* [x] Add more tests for restricted visibility functionality

cc @sytse @dzaporozhets

See merge request !1655
2015-03-16 17:49:46 +00:00
Douwe Maan e97cdb042d Remove old team scopes. 2015-03-15 13:50:38 +01:00
Douwe Maan 31fc73f0a9 Use `project_member` instead of `team_member`. 2015-03-15 13:50:38 +01:00
Hannes Rosenögger 7ff9c8229d Add a service to support external wikis 2015-03-12 19:13:51 +01:00
Vinnie Okada 285c534185 Allow admins to override restricted visibility
Allow admins to use restricted visibility levels when creating or
updating projects.
2015-03-08 16:10:05 -06:00
Vinnie Okada cacac147de Move restricted visibility settings to the UI
Add checkboxes to the application settings page for restricted
visibility levels, and remove those settings from gitlab.yml.
2015-03-07 13:11:08 -07:00
Stan Hu 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
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
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
Dmitriy Zaporozhets 0d884ff2b1 Merge branch 'extend_markdown_upload' into 'master'
Generalizes image upload in drag and drop in markdown to all files

From https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/265 by Hannes Rosenögger.

- [x] Rebase on master when !1553 is merged in

See merge request !1530
2015-02-25 23:36:03 +00:00
Dmitriy Zaporozhets a52529f9b6 Merge branch 'bitbucket-import'
Conflicts:
	app/views/import/gitorious/status.html.haml
	db/schema.rb
2015-02-25 09:21:45 -08:00
Douwe Maan 5f7a3e1bbd Merge branch 'master' into extend_markdown_upload
# Conflicts:
#	app/controllers/files_controller.rb
2015-02-25 11:59:25 +01:00
Douwe Maan ad6d623234 Add Bitbucket importer. 2015-02-24 15:07:24 +01:00