Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2016-12-22Merge branch 'adam-auto-deploy' into 'master' Kamil Trzciński
Auto deploy Closes #23580 See merge request !8135
2016-12-22Merge branch '22742-filter-protocol-relative-urls' into 'master' Rémy Coutable
Filter protocol-relative URLs in ExternalLinkFilter. Fixes issue #22742. Closes #22742 See merge request !6635
2016-12-21Merge branch '25908-fix-grape-after-update' into 'master' Yorick Peterse
Use Grape's new Route methods See merge request !8223
2016-12-21Merge branch 'zj-mattermost-slash-config' into 'master'Kamil Trzciński
Mattermost slash auto config Closes #24769 See merge request !8070
2016-12-21Merge branch 'fix/import-labels-error' into 'master' Douwe Maan
Fix Import/Export labels error Closes #24257 See merge request !8212
2016-12-21Merge branch 'fix/import-export-build-token' into 'master' Grzegorz Bizon
Fix duplicated build token problem importing projects Reset token so duplicated builds do not thrown an error on import - [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added - 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) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23475 See merge request !8171
2016-12-21Merge branch 'multipart-uploaded-file' into 'master' Rémy Coutable
Inject ::UploadedFile from Multipart middleware Closes #25888 See merge request !8215
2016-12-21Merge branch '4269-public-files-api' into 'master' Sean McGivern
Allow unauthenticated access to Repositories Files API GET endpoints See merge request !8149
2016-12-21Merge branch '4269-public-repositories-api' into 'master' Sean McGivern
Allow Repositories API GET endpoints to be requested anonymously Closes #4269 See merge request !8148
2016-12-21Merge branch 'fix/detailed-status-groups' into 'master' Lin Jen-Shin (godfat)
Improve icons and style for manual build status ## What does this MR do? This MR changes the CSS class for manual build status badge to make it a little more different than skipped build status badge. It makes it darker. ## Screenshots ![Screen_Shot_2016-12-17_at_13.37.58](/uploads/9628f0e84fdaad82d8833f546f0192a6/Screen_Shot_2016-12-17_at_13.37.58.png)![Screen_Shot_2016-12-17_at_13.31.48](/uploads/fe8e27df0274b9f9ae840110593a298a/Screen_Shot_2016-12-17_at_13.31.48.png) See merge request !8102
2016-12-21Merge branch 'update-nginx-config-for-websockets' into 'master' Kamil Trzciński
Update NGINX configuration files to add websocket support ## What does this MR do? Changes the bundled NGINX configuration files to support websockets introduced in https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/83 These changes are also going into omnibus: https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests/1146 ## Are there points in the code the reviewer needs to double check? Best to wait until the omnibus MR is merged as the method may be changed. ## Why was this MR needed? Without it, NGINX won't let websockets through to workhorse. ## Screenshots (if relevant) ## Does this MR meet the acceptance criteria? - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - Tests - [x] All builds are passing - [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? Related to #22864 See merge request !8039
2016-12-21Merge branch '22864-kubernetes-deploy-with-terminal' into 'master' Kamil Trzciński
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-21Merge branch 'fix-forbidden-for-build-api-for-deleted-project' into 'master' Grzegorz Bizon
Give forbidden if project for the build was deleted I guess we don't need a change log entry because this is just for an internal corner case fix. Closes #25309 See merge request !8091
2016-12-21Merge branch 'fix-yaml-variables' into 'master' Grzegorz Bizon
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-21Merge branch 'dockerfile-templates' into 'master' Rémy Coutable
Allow to use Dockerfile templates See merge request !7247
2016-12-21Merge branch 'zj-kamil-slack-slash-commands' into 'master'Grzegorz Bizon
Slack slash commands Implement Slack Slash Commands by utilizing generalized Mattermost presenter to fulfill Slack requirements. We want to expose Slack Slash Commands as a first-class service. Supersedes !8007 Closes #22182 See merge request !8126
2016-12-21Merge branch '22348-gitea-importer' into 'master' Rémy Coutable
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! :christmas_tree: 1. I've added routing specs for import routes! :christmas_tree: Closes #22348 See merge request !8116
2016-12-21Merge branch 'fix/import-export-ee-services' into 'master' Rémy Coutable
Fix missing service error importing from EE to CE Ignores services that are missing in the new instance (EE or even a customised instance), to avoid breaking the import. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23782 See merge request !8144
2016-12-21Merge branch 'fix/import-export-mr-error' into 'master' Rémy Coutable
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-21Merge branch 'bb-wiki-import' into 'master' Douglas Barbosa Alexandre
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-21Merge branch '25895-fix-headers-in-ci-api-helpers' into 'master' Kamil Trzciński
Ensure nil User-Agent doesn't break the CI API Closes #25895 See merge request !8213
2016-12-21Merge branch 'fix/25843' into 'master'Sean McGivern
Rename SlackNotificationService back to SlackService See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8191#note_20310845 Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/25843 /cc @yorickpeterse @stanhu @smcgivern @felipe_artur @ayufan See merge request !8208
2016-12-20Merge branch '25848-fix-git-rev-list-env-parsing' into 'master' Sean McGivern
Reject blank environment variables in Gitlab::Git::RevList Closes #25848 See merge request !8189
2016-12-19Merge branch '25301-git-2.11-force-push-bug' into 'master' Douglas Barbosa Alexandre
Accept environment variables from the `pre-receive` script ## Summary 1. Starting version 2.11, git changed the way the pre-receive flow works. - Previously, the new potential objects would be added to the main repo. If the pre-receive passes, the new objects stay in the repo but are linked up. If the pre-receive fails, the new objects stay orphaned in the repo, and are cleaned up during the next `git gc`. - In 2.11, the new potential objects are added to a temporary "alternate object directory", that git creates for this purpose. If the pre-receive passes, the objects from the alternate object directory are migrated to the main repo. If the pre-receive fails the alternate object directory is simply deleted. 2. In our workflow, the pre-recieve script (in `gitlab-shell`) calls the `/allowed` endpoint, which calls out directly to git to perform various checks. These direct calls to git do _not_ have the necessary environment variables set which allow access to the "alternate object directory" (explained above). Therefore these calls to git are not able to access any of the new potential objects to be added during this push. 3. We fix this by accepting the relevant environment variables (`GIT_ALTERNATE_OBJECT_DIRECTORIES`, `GIT_OBJECT_DIRECTORY`, and `GIT_QUARANTINE_PATH`) on the `/allowed` endpoint, and then include these environment variables while calling out to git. 4. This commit includes these environment variables while making the "force push" check. ## Issue Numbers - Closes #25301 (assuming the corresponding `gitlab-shell` MR has been merged in first) - Corresponding `gitlab-shell` MR: gitlab-org/gitlab-shell!112 - Corresponding EE MR: gitlab-org/gitlab-ee!964 ## Tasks - [#25301/!7967/!112] Git version 2.11.0 - Can't push to protected branch as master or developer - [x] Investigate - [x] Implementation - [x] `force_push.rb` should use the relevant environment variables - [x] Any other instances of `/allowed` calling out to git directly? - [x] Verify that the fix works over SSH as well - [x] Can we trim the number of env variables? Do we need all 3? - [x] Whitelist variables. Server shouldn't pass through _any_ env variable passed in - [x] Any security implications? - [x] Check for force push return code - [x] Shouldn't be able to opt-out from the force push check by passing an env variable - [x] Tests - [x] CE - [x] Added - [x] Passing - [x] Shell - [x] Added - [x] Passing - [x] Meta - [x] CHANGELOG entry created - [x] Branch has no merge conflicts with `master` - [x] Squashed related commits together - [x] EE merge request - [x] Review - [x] Endboss - [ ] Follow-up - [x] Make sure EE is working as expected - [x] [CE] Gitlab changes without gitlab-shell changes shouldn't raise any exceptions - [x] [CE] Gitlab-shell changes without gitlab changes shouldn't raise any exceptions - [x] [EE] Gitlab changes without gitlab-shell changes shouldn't raise any exceptions - [x] [EE] Gitlab-shell changes without gitlab changes shouldn't raise any exceptions - [ ] Wait for merge - [ ] CE - [ ] EE - [x] Shell See merge request !7967
2016-12-17Fix rubocop failuresKamil Trzcinski
2016-12-17Store mattermost_url in settingsKamil Trzcinski
2016-12-17Improve Mattermost Session specsKamil Trzcinski
2016-12-17Ensure the session is destroyedZ.J. van de Weg
2016-12-17Improve session testsZ.J. van de Weg
2016-12-17Setup mattermost sessionZ.J. van de Weg
2016-12-17Avoid use of Hash#dig to keep compatibility with Ruby 2.1Douglas Barbosa Alexandre
2016-12-17Fix import issues methodDouglas Barbosa Alexandre
2016-12-16Merge remote-tracking branch 'origin/master' into bitbucket-oauth2Douglas Barbosa Alexandre
2016-12-16Fix rubucop offensesDouglas Barbosa Alexandre
2016-12-16Merge branch '20492-access-token-scopes' into 'master' Rémy Coutable
Resolve "Add a doorkeeper scope suitable for authentication" ## What does this MR do? - Add a single new scope (in addition to the `api` scope we've had) - `read_user` - Allow creating OAuth applications and Personal access tokens with a scope selected - Enforce scopes in the API ## What are the relevant issue numbers? - Closes #20492 - EE counterpart for this MR: gitlab-org/gitlab-ee!946 See merge request !5951
2016-12-16BB importer: Adressed more review commentsValery Sizov
2016-12-16BB importer: address review commentValery Sizov
2016-12-16Merge branch 'issue_22269' into 'master' Kamil Trzciński
Mattermost Notifications Service ## What does this MR do? closes #22269 ## Screenshots ![mattermost](/uploads/de71c121f544a91305b6dfa6dc4c5738/mattermost.png) ![slack](/uploads/081d75d49239319d94332abda214fb98/slack.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) - [x] API support added - 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) See merge request !7764
2016-12-16BB importer: Milestone importerValery Sizov
2016-12-16Rename the `token_has_scope?` method.Timothy Andrew
`valid_api_token?` is a better name. Scopes are just (potentially) one facet of a "valid" token.
2016-12-16Convert AccessTokenValidationService into a class.Timothy Andrew
- Previously, AccessTokenValidationService was a module, and all its public methods accepted a token. It makes sense to convert it to a class which accepts a token during initialization. - Also rename the `sufficient_scope?` method to `include_any_scope?` - Based on feedback from @rymai
2016-12-16Refactor access token validation in `Gitlab::Auth`Timothy Andrew
- Based on @dbalexandre's review - Extract token validity conditions into two separate methods, for personal access tokens and OAuth tokens.
2016-12-16Implement minor changes from @dbalexandre's review.Timothy Andrew
- Mainly whitespace changes. - Require the migration adding the `scope` column to the `personal_access_tokens` table to have downtime, since API calls will fail if the new code is in place, but the migration hasn't run. - Minor refactoring - load `@scopes` in a `before_action`, since we're doing it in three different places.
2016-12-16Validate access token scopes in `Gitlab::Auth`Timothy Andrew
- This module is used for git-over-http, as well as JWT. - The only valid scope here is `api`, currently.
2016-12-16 Calls to the API are checked for scope.Timothy Andrew
- Move the `Oauth2::AccessTokenValidationService` class to `AccessTokenValidationService`, since it is now being used for personal access token validation as well. - Each API endpoint declares the scopes it accepts (if any). Currently, the top level API module declares the `api` scope, and the `Users` API module declares the `read_user` scope (for GET requests). - Move the `find_user_by_private_token` from the API `Helpers` module to the `APIGuard` module, to avoid littering `Helpers` with more auth-related methods to support `find_user_by_private_token`
2016-12-16Merge branch 'katex-math-fixup' into 'master' Sean McGivern
Don't open Asciidoc module twice See merge request !8119
2016-12-16Merge branch ↵Kamil Trzciński
'25144-gitlab-ce-mattermost-slash-command-for-issue-create-needs-better-documentation' into 'master' Resolve "gitlab-ce mattermost slash command for issue create needs better documentation" ## What does this MR do? Updates the documentation and the <kbd>help</kbd> command to be clearer, having the keys used to add a newline in chat clients (both Mattermost and Slack). ## Are there points in the code the reviewer needs to double check? * Are the available commands (via <kbd>help</kbd>) being formatted as `<code>` ? ## Why was this MR needed? `\n` represents a new line character and doesn't communicate how the user should input the command. Also, to be correct, the documentation should use `<kbd>` instead of `<code>` for user input ([see HTML5 specification](https://www.w3.org/TR/html5/text-level-semantics.html#the-kbd-element)) ## Screenshots (if relevant) | Mattermost | Docs | | --- | --- | | ![image](/uploads/539526a14bfd551b7e732dd96c5b7581/image.png) | ![image](/uploads/e3eb099f86c5a32ce3b8954e72c29848/image.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 - [ ] All builds are passing ## What are the relevant issue numbers? Closes #25144 See merge request !7850
2016-12-15Merge branch 'show-commit-status-from-latest-pipeline' into 'master' Grzegorz Bizon
Show commit status from latest pipeline Show commit status from latest pipeline rather than compound status from all pipelines. Closes #20560 See merge request !7333
2016-12-15Don't open Asciidoc module twiceMunken
2016-12-15Change SlackService to SlackNotificationsServiceFelipe Artur