Commit Graph

3280 Commits

Author SHA1 Message Date
Drew Blessing de4eee0894 LDAP attributes needs default values 2017-01-06 00:24:33 -06:00
Robert Speicher 2e20a71d21 Ensure internal Gitlab::Git references use the namespace 2017-01-04 19:09:29 -05:00
Robert Speicher a00578ce5c Absorb gitlab_git 2017-01-04 19:09:28 -05:00
Robert Speicher 115aac77f6 Merge branch 'ldap_person_attributes' into 'master'
Gitlab::LDAP::Person uses LDAP attributes configuration

Closes #26290

See merge request !8418
2017-01-03 21:11:10 +00:00
Drew Blessing babb7d5260 Gitlab::LDAP::Person uses LDAP attributes configuration
We allow users to configure LDAP attribute preferences. For example,
email can be configured to use `mail`, `email` and `userPrincipalName`,
falling through to the next until a value is found. Prior to this
change, Gitlab::LDAP::Person did not honor this configuration. Now,
the class will honor `name` and `mail` configuration. It does not
handle `username`, or fallback to `first_name` + `last_name` in the
absence of `name`.
2017-01-03 13:26:47 -06:00
Kamil Trzciński 447314c0f3 Merge branch 'zj-revert-polymorphic-url' into 'master'
Revert specific URL

See merge request !8321
2017-01-03 15:52:30 +00:00
James Lopez 112f470572 Fix cross-project references copy to include the project reference
Also added relevant specs and refactored to_references in a bunch of places to be more consistent.
2017-01-03 13:01:46 +01:00
Annabel Dunstone Gray 293eed4d63 Merge branch 'issues/8081' into 'master'
Issues/8081

See merge request !7908
2016-12-27 19:44:57 +00:00
Douwe Maan 20afb4c69e Merge branch 'feature/1376-allow-write-access-deploy-keys' into 'master'
Allow to add deploy keys with write-access

Closes #1376

See merge request !7383
2016-12-27 15:00:49 +00:00
Douwe Maan d6a37a8cef Merge branch 'bugfix/outlook-language-parsing' into 'master'
Switch to Discourse's EmailReplyTrimmer for more robust reply parsing

See merge request !7473
2016-12-27 14:46:47 +00:00
Douwe Maan 07f0486cf8 Merge branch '25931-gitlab-merge-request-view-crash-when-commiting-a-js-sourcemap-file' into 'master'
Resolve "Gitlab merge request view crash when commiting a js sourcemap file"

Closes #25931

See merge request !8310
2016-12-27 12:10:20 +00:00
Sean McGivern fe60079454 Merge branch 'auto-deploy-with-space' into 'master'
Rename "autodeploy" to "auto deploy"

Closes #25999

See merge request !8289
2016-12-27 10:52:04 +00:00
Z.J. van de Weg 1955bcaa22 Revert specific URL 2016-12-27 10:43:23 +01:00
Sean McGivern 1e5e56c698 Fix MR with files hidden by .gitattributes
Don't try to highlight and cache files hidden by .gitattributes entries.
2016-12-26 16:25:55 +00:00
Adam Niedzielski db8ee6672c Rename "autodeploy" to "auto deploy" 2016-12-23 11:08:18 +01:00
Z.J. van de Weg b7894a7451 Fix errorcode 500 on slash commands
Coverage was failing, so this could slip through the cracks
2016-12-23 09:46:32 +01:00
http://jneen.net/ 7218daaa96 fix guard style 2016-12-22 00:10:35 -08:00
Kamil Trzciński 68d89aa96b Merge branch 'adam-auto-deploy' into 'master'
Auto deploy

Closes #23580

See merge request !8135
2016-12-21 21:34:45 +00:00
http://jneen.net/ 1b8a576d3f Be more certain in the comment 2016-12-21 09:51:42 -08:00
http://jneen.net/ f02f238d52 Revert "allow empty-quotes"
This reverts commit 4f2f678aff8d7dfcac96c47cf7eb480a5707ddaf.
2016-12-21 09:51:42 -08:00
http://jneen.net/ 5603127699 remove comment attribution 2016-12-21 09:51:41 -08:00
http://jneen.net/ 602c319862 allow empty-quotes 2016-12-21 09:51:41 -08:00
http://jneen.net/ 017579fe14 protect against EmailReplyTrimmer returning nil 2016-12-21 09:51:41 -08:00
http://jneen.net/ 03753ff146 remove trailing whitespace from email bodies 2016-12-21 09:51:41 -08:00
http://jneen.net/ a3bb2463c4 switch to email_reply_trimmer from discourse 2016-12-21 09:51:39 -08:00
Yorick Peterse c9fdf739b2 Merge branch '25908-fix-grape-after-update' into 'master'
Use Grape's new Route methods

See merge request !8223
2016-12-21 15:53:19 +00:00
Adam Niedzielski 9809a9af8a Introduce "Set up autodeploy" button to help configure GitLab CI for deployment
The button allows to choose a ".gitlab-ci.yml" template that automatically
sets up the deployment of an application.
The currently supported template is Kubernetes template.
2016-12-21 16:21:55 +01:00
Douwe Maan 6e8ba3b79f Merge branch 'fix/group-path-rename-error' into 'master'
Fix error 500 renaming group. Also added specs and changelog.

Closes #17922 and #23223

See merge request !8201
2016-12-21 14:54:02 +00:00
Rémy Coutable 7e5deb6abe Merge branch 'multipart-uploaded-file' into 'master'
Inject ::UploadedFile from Multipart middleware

Closes #25888

See merge request !8215
2016-12-21 13:38:04 +00:00
Rémy Coutable 90c6a1a319 Use Grape's new Route methods
- Use Route#request_method instead of Route#route_method
- Use Route#path instead of Route#route_path

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-21 13:46:52 +01:00
Jacob Vosmaer 4ec259fd36 Inject ::UploadedFile from Multipart middleware
I mistakenly concluded Rack::Multipart injects File instances into the
params. These should be UploadedFile instances. This reuses a mock
UploadedFile class we already had in GitLab.
2016-12-21 13:07:53 +01:00
James Lopez 5452747729 Fix error importing label priorities and added relevant spec 2016-12-21 10:33:20 +01:00
James Lopez b82fdf6257 Fix error 500 renaming group. Also added specs and changelog. 2016-12-20 17:52:27 +01:00
Lin Jen-Shin c1d11bf57c Rubocop prefers to indent this way 2016-12-20 23:30:01 +08:00
Lin Jen-Shin 884f57c910 Use consistent names and move checks to the method,
and move those checks to be private. Feedback:

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7383#note_20285012

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7383#note_20285279
2016-12-20 21:19:07 +08:00
Lin Jen-Shin 0f0738e788 Merge remote-tracking branch 'upstream/master' into feature/1376-allow-write-access-deploy-keys
* upstream/master: (538 commits)
  Reject blank environment vcariables in Gitlab::Git::RevList
  Add online terminal documentation
  Add changelog entry
  Add terminal UI and controller actions
  Fix specs
  Even out padding on plus button in breadcrumb menu
  Update font size of detail page header to 14px
  Update CHANGELOG.md for 8.13.10
  Update CHANGELOG.md for 8.14.5
  Fix Route#rename_children behavior
  Remove inline-block styling from status
  Add terminals to the Kubernetes deployment service
  Add a ReactiveCaching concern for use in the KubernetesService
  Add xterm.js 2.1.0 and a wrapper class to the asset pipeline
  Remove unnecessary hidden svg elements for icons.
  Fix consistent typo in environment.js
  Use a block to insert extra check for authenticate_build!
  Align milestone column header with count number
  Add Wiki import to BB importer
  Make CI badge hitboxes better match container
  ...
2016-12-20 20:54:40 +08:00
Rémy Coutable 367b68a01d Merge branch '22348-gitea-importer' into 'master'
It adds a brand new importer for Gitea!

This is a continuation of !6945 started by @bkc.

Gitea aims to be 100% GitHub-compatible but there's a few differences:

- Gitea is not an OAuth provider (yet): https://github.com/go-gitea/gitea/issues/27
  - This means we cannot map Gitea users given an assignee ID => assignees are not set on imported issues and merge requests
- No releases API for now: https://github.com/go-gitea/gitea/issues/330
- API version is `v1` (GitHub is `v3`)
- The IID field for milestones is `id` compared to `number` in GitHub.
- Issues, PRs, milestones, labels don't have a `url` field (the importer now fallback to `''` in that case)

**Known issues:**

- Comments are not imported because comments JSON always have a blank `html_url`/`issue_url`/`pull_request_url`, so the IID cannot be extracted and the issuable cannot be found... :( This is tracked in https://github.com/go-gitea/gitea/issues/401, and solved by https://github.com/gogits/gogs/pull/3624 but this needs to be submitted / merged in Gitea.

This is noted in the documentation.

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

1. I've made `Import::GiteaController` inherit from `Import::GithubController` since both controllers should be identical in the long-term and their current differences are small.
1. I've added a base `IssuableFormatter` class from which `IssueFormatter` & `PullRequestFormatter` inherit
1. I've added shared examples for GitHub/Gitea importer classes
1. I've made `Gitlab::ImportSources` more robust and tested! 🎄 
1. I've added routing specs for import routes! 🎄 

Closes #22348

See merge request !8116
2016-12-20 11:11:24 +00:00
Kamil Trzciński 7607226026 Merge branch '22864-kubernetes-deploy-with-terminal' into 'master'
Add online terminal support for Kubernetes

## What does this MR do?

Gives terminal access to kubernetes-deployed environments  via the deployment service

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

## Why was this MR needed?

Part of idea to production

## Screenshots (if relevant)

### `/root/reviewing/environments`

![Screen_Shot_2016-12-15_at_19.10.40](/uploads/bd2c54c07b6c85dec3328a20cd185b64/Screen_Shot_2016-12-15_at_19.10.40.png)

### `/root/reviewing/environments/10013`

![Screen_Shot_2016-12-19_at_12.52.39](/uploads/db4e4e06cda88437e8727433d65898b9/Screen_Shot_2016-12-19_at_12.52.39.png)

### `/root/reviewing/enviroments/10013/terminal`

![Screen_Shot_2016-12-15_at_02.35.52](/uploads/1bb77b7e2de2c657ae3bda62dc4f0970/Screen_Shot_2016-12-15_at_02.35.52.png)

## Does this MR meet the acceptance criteria?

- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- Tests
  - [X] Added for this feature/bug
  - [x] 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 #22864 #22958
* Alternative to, and somewhat based on,  !6770 
* Depends on https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/83

See merge request !7690
2016-12-20 10:34:29 +00:00
Sean McGivern deb74f73d9 Merge branch '25848-fix-git-rev-list-env-parsing' into 'master'
Reject blank environment variables in Gitlab::Git::RevList

Closes #25848

See merge request !8189
2016-12-20 10:14:20 +00:00
Grzegorz Bizon 52278412c7 Merge branch 'zj-kamil-slack-slash-commands' into 'master'
Slack slash commands

## What does this MR do?

Implement Slack Slash Commands by utilizing generalized Mattermost presenter to fulfill Slack requirements.

## Why was this MR needed?

We want to expose Slack Slash Commands as a first-class service.

## What are the relevant issue numbers?

Supersedes !8007  
Closes #22182

See merge request !8126
2016-12-20 09:41:37 +00:00
Rémy Coutable 212967aefb
Reject blank environment vcariables in Gitlab::Git::RevList
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-20 09:45:37 +01:00
Douglas Barbosa Alexandre d1d1e7c6d7 Merge branch 'bb-wiki-import' into 'master'
Add Wiki import to BB importer

## What does this MR do?

Adds wiki importing



- [ ] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) 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 it does - 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 https://gitlab.com/gitlab-org/gitlab-ce/issues/25819

See merge request !8180
2016-12-19 21:31:29 +00:00
Nick Thomas c3d972f4e8 Add terminals to the Kubernetes deployment service 2016-12-19 19:53:04 +00:00
Grzegorz Bizon 5048baaa37 Merge branch 'fix-yaml-variables' into 'master'
Convert CI YAML variables keys into strings

So that this would be more consistent with the other variables,
which all of them are string based.

Closes #25554

See merge request !8088
2016-12-19 19:09:04 +00:00
Valery Sizov 5b0ebbe5b4 Add Wiki import to BB importer 2016-12-19 20:48:08 +02:00
Rémy Coutable 8c8c4f8c5a Merge branch 'fix/import-export-mr-error' into 'master'
Fix import/export merge requests error

When MWBS is set and the MR exported/imported an error gets thrown. We should ignore this so it can succeed as the merge user may no longer exist in the target instance.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/24009 and https://gitlab.com/gitlab-com/support-forum/issues/1345

See merge request !8134
2016-12-19 18:03:06 +00:00
Rémy Coutable ab06313c36 Add Project#gitea_import?
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-19 17:35:51 +01:00
Rémy Coutable 8fc63d1f64 Improve Gitlab::ImportSources
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-19 17:35:51 +01:00
Rémy Coutable 99ddd1dcbe Modify GithubImport to support Gitea
The reason is that Gitea plan to be GitHub-compatible so it makes sense
to just modify GitHubImport a bit for now, and hopefully we can change
it to GitHubishImport once Gitea is 100%-compatible.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-19 17:35:51 +01:00
Rémy Coutable 103114e3d7 Rename Gogs to Gitea, DRY the controller and improve views
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-19 17:35:51 +01:00