summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Properly quote table name in Rake task for MySQL and PostgreSQL compatibilityfix-issue-15259-postgresqlStan Hu2016-06-091-1/+1
| | | | | | !4318 broke the gitlab:db:drop_tables functionality for PostgreSQL. Closes #15259
* Merge branch 'fix_issue_15259' into 'master' Stan Hu2016-06-091-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix bug with SQL syntax error during backup restoration ## What does this MR do? It properly escapes the table name in the `DROP TABLE IF EXISTS ...` statement used during restore of a backup. ## Are there points in the code the reviewer needs to double check? Please check compatibility with PostgreSQL ## Why was this MR needed? Fix an issue with backups can not be restored if MySQL is used as database for GitLab. ## What are the relevant issue numbers? #15259 ## Screenshots (if relevant) - See merge request !4318
| * Fix bug with SQL syntax error during backup restorationDaniel Beyer2016-05-271-1/+1
| | | | | | closes #15259
* | Merge branch 'saml-ldap-link-flow' into 'master' Douwe Maan2016-06-092-7/+14
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust the SAML control flow to allow LDAP identities to be added to an existing SAML user. ## What does this MR do? It correctly lets an existing SAML user to add their LDAP identity automatically at login. ## Why was this MR needed? A customer had issues with the `auto_link_ldap_user` feature. The flow was not working if there was an account with a SAML identity, but no LDAP identity. GitLab would pick up the correct LDAP person, but due to the order of the flow, that LDAP person was never associated with the user. ## What are the relevant issue numbers? Fixes #17346 /cc @dblessing @balameb @stanhu See merge request !4498
| * | Syntax fixes and better logging around the `ldap_person` method.saml-ldap-link-flowPatricio Cano2016-06-081-4/+5
| | |
| * | Moved `find_or_create_ldap_user` method to parent class and added logging.Patricio Cano2016-06-072-30/+12
| | |
| * | Adjust the SAML control flow to allow LDAP identities to be added to an ↵Patricio Cano2016-06-062-3/+27
| | | | | | | | | | | | existing SAML user.
* | | Merge branch '18019-fix-wiki-linking' into 'master' Rémy Coutable2016-06-092-26/+46
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix wiki linking behavior for markdown wiki pages Related to #18019 - As per the documentation in !4372 ## TODO - [ ] !4432 Have wiki linking behave as per the documentation - [x] Move `WikiLinkFilter` specs to the pipeline level - [x] Verify current behavior on wiki `show` page - [x] Fix current behavior on wiki `show` page - [x] Verify current behaviour on wiki preview - [x] Fix current behaviour on wiki preview - [x] Rewrite all links and get preview links working - [x] Make sure all links are on-par with the wiki `show` page - [x] TDD `WikiLinkFilter` and get it working - [x] Hook `WikiLinkFilter` up - [x] Fix tests - [x] Fix `markdown_spec` - [x] Fix `wiki` spinach feature - [x] Wait for [build](https://gitlab.com/gitlab-org/gitlab-ce/commit/4f50dd2/builds) to pass - [x] Make sure all wiki-related pages are working as expected (history, all pages, etc.) - [x] Test in different ruby versions - [x] GitLab instances hosted on a relative URL - [x] Non-markdown rendering formats? - [x] RDoc - [x] ASCIIDoc - [x] Create issues to fix things for RDoc and ASCIIDoc - [x] Gauge performance impact - [x] Refactor - [x] Re-organize commits - [x] Make sure [build](https://gitlab.com/gitlab-org/gitlab-ce/commit/f860e9a8dcabe7d5f160c32fc549807c98baa4a1/builds) passes - [x] Respond to @rymai's comments - [x] `class WikiLinkFilter < HTML::Pipeline::Filter` - [x] blank line after guard clause - [x] keyword arguments for `wiki` and `slug` - [x] invert the condition - [x] inline `user` in spec - [x] Make sure spec names are not out of date - [x] Comment for each rewrite rule - [x] Add CHANGELOG entry - [x] Reorganize commits - [x] Make sure [build](https://gitlab.com/gitlab-org/gitlab-ce/commit/19b91e749a6320d12fb299d33f1f6440777e0e26/builds) passes - [ ] Wait for merge See merge request !4432
| * | | Implement the correct linking behaviour in `WikiLinkFilter`.Timothy Andrew2016-06-092-26/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original Comments ================= - Linking behaves as per rules documented here: https://gitlab.com/gitlab-org/gitlab-ce/blob/16568-document-wiki-linking-behavior/doc/markdown/wiki.md - All links (to other wiki pages) are rewritten to be at the level of the app root. We can't use links relative to the current page ('./foo', 'foo', '../foo'), because they won't work in the markdown preview, where the current page is suffixed with `/edit` - Move existing `WikiLinkFilter` specs to `WikiPipeline` spec. It makes sense to run these tests on the combined output of the pipeline, rather than a single filter, since we can catch issues with conflicting filters. - Add more tests to cover the new linking @rymai's Review =============== - Classes nested under `WikiLinkFilter` should declare `WikiLinkFilter`'s inherit, so nothing changes if the nested class is loaded first. - Add a blank line after a guard clause - Use keyword arguments for the `Rewriter` constructor - Invert a condition - use `if` instead of `unless` - Inline a `let` in `WikiPipeline` spec - it was only used in a single place - Change out of date spec names - Add a comment for every rewrite rule in `Rewriter`
* | | | Merge branch '14098-customize-after-sign-up-path' into 'master' Robert Speicher2016-06-082-1/+5
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow custom text on 'almost there' page Add a new application setting, after_sign_up_text. This is text to be rendered as Markdown and shown on the 'almost there' page after a user signs up, but before they've confirmed their account. Closes #14098. See merge request !4098
| * | | | Allow custom text on 'almost there' pageSean McGivern2016-06-082-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new application setting, after_sign_up_text. This is text to be rendered as Markdown and shown on the 'almost there' page after a user signs up, but before they've confirmed their account. Tweak the styles for that page so that centered lists look reasonable.
* | | | | Remove obvious comment and extra lineAlfredo Sumaran2016-06-081-2/+0
| | | | |
* | | | | Set target="_blank" for external linksAlfredo Sumaran2016-06-081-0/+3
|/ / / /
* | | | Fix pseudo n+1 queries with Note and Note Authors in issuables APIsAlejandro Rodríguez2016-06-082-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was not a clear cut n+1 query, given that if you're directly subscribed to all issues that the API is returning you never really need to check for the notes. However, if you're subscribed to _all_ of them, then for each issuable you need to go once to `notes`, and once to `users` (for the authors). By preemtively loading notes and authors, at worst you have 1 extra query, and at best you saved 2n extra queries. We also took advantage of this preloading of notes when counting user notes.
* | | | Merge branch 'git-http-controller' into 'master' Rémy Coutable2016-06-085-68/+134
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dismantling Grack::Auth part 1: Git HTTP clients Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/14501 This does not completely get rid of Grack::Auth yet because Git LFS support is 'behind' it and I would like to not make this MR bigger than needed. - changed tests to make HTTP requests instead of calling Rack apps - added missing test cases for Git HTTP authentication - moved Git HTTP requests into a 'normal' Rails controller See merge request !3361
| * \ \ \ Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into ↵Jacob Vosmaer2016-06-0848-382/+596
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-http-controller Conflicts: lib/gitlab/workhorse.rb
| * | | | | Fix testsJacob Vosmaer2016-06-062-21/+21
| | | | | |
| * | | | | Use public_sendJacob Vosmaer2016-06-031-2/+1
| | | | | |
| * | | | | Argh mixed up all the negativesJacob Vosmaer2016-06-031-2/+2
| | | | | |
| * | | | | Remove instances of Auth.newJacob Vosmaer2016-06-031-1/+1
| | | | | |
| * | | | | Refactor Gitlab::Auth rate limitingJacob Vosmaer2016-06-032-25/+53
| | | | | |
| * | | | | Changes after more review from RémyJacob Vosmaer2016-06-031-13/+13
| | | | | |
| * | | | | Rename finder to find_in_gitlab_or_ldapJacob Vosmaer2016-06-023-4/+4
| | | | | |
| * | | | | Merge branch 'master' into git-http-controllerJacob Vosmaer2016-06-02137-982/+2817
| |\ \ \ \ \ | | | |/ / / | | |/| | | | | | | | | | | | | | | Conflicts: config/routes.rb
| * | | | | Remove parallel assignmentJacob Vosmaer2016-05-031-1/+2
| | | | | |
| * | | | | Rubocop and whitespaceJacob Vosmaer2016-05-021-2/+2
| | | | | |
| * | | | | Use correct auth finderJacob Vosmaer2016-05-022-7/+2
| | | | | |
| * | | | | Make CI/Oauth/rate limiting reusableJacob Vosmaer2016-04-293-15/+102
| | | | | |
| * | | | | Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into ↵Jacob Vosmaer2016-04-1522-88/+300
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | git-http-controller
| * \ \ \ \ \ Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into ↵Jacob Vosmaer2016-04-1267-349/+946
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | git-http-controller
| * | | | | | | Move workhorse protocol code into libJacob Vosmaer2016-04-061-0/+7
| | | | | | | |
| * | | | | | | Delete dead codeJacob Vosmaer2016-04-061-52/+1
| | | | | | | |
* | | | | | | | Merge branch 'gh-disable-webhooks' into 'master' Douwe Maan2016-06-081-0/+1
|\ \ \ \ \ \ \ \ | |_|_|_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check if GitHub rate limite API was reached before update Webhooks ## What does this MR do? Checks if the job needs to sleep, and wait for the rate limit to be reseted before update each Webhook. ## Are there points in the code the reviewer needs to double check? No. ## Why was this MR needed? The import process can fail if the API rate limit was reached during the import process. ## What are the relevant issue numbers? https://gitlab.com/gitlab-org/gitlab-ce/issues/17498 ## Screenshots (if relevant) Not relevant. See merge request !4509
| * | | | | | | Check if GitHub rate limite API was reached before update Webhooksgh-disable-webhooksDouglas Barbosa Alexandre2016-06-071-0/+1
| | | | | | | |
* | | | | | | | Merge branch 'refactor/ci-config-add-facade' into 'master' Rémy Coutable2016-06-073-7/+44
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new GitLab CI configuration facade class ## What does this MR do? This MR is a first iteration of major CI configuration refactoring. See #17139 and #15060 for more details. ## What are the relevant issue numbers? Closes #17139 See merge request !4462
| * | | | | | | | Improve Ci config loader by changing method signaturerefactor/ci-config-add-facadeGrzegorz Bizon2016-06-072-2/+2
| | | | | | | | |
| * | | | | | | | Remove duplicated exception in Ci configGrzegorz Bizon2016-06-072-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a temporary refactoring stub, that is planned to be removed after removing legacy config processor.
| * | | | | | | | Rename class that loads CI configuration to LoaderGrzegorz Bizon2016-06-063-8/+8
| | | | | | | | |
| * | | | | | | | Extract CI config YAML parser to a separate classGrzegorz Bizon2016-06-032-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this approach it would be easier to add different sources of configuration, that we do not necessairly have to be in YAML format.
| * | | | | | | | Add gitlab ci configuration class that holds hashGrzegorz Bizon2016-06-032-7/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As for now, we keep this class inside a oryginal config processor class. We will move implementation to this class and delegate to it from current config processor. After original gitlab ci yaml processor not longer has relevant impelemntation we will replace it with new configuration class.
* | | | | | | | | Merge branch 'issue_14189' into 'master' Jacob Schatz2016-06-071-0/+14
|\ \ \ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ability to prioritize labels Closes #14189 See merge request !4009
| * | | | | | | | Improve Issuable.order_labels_priorityRémy Coutable2016-06-061-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | | | | | | | | Merge branch 'zj-workhorse-to-serve-diffs' into 'master' 14722-searching-for-usernames-should-only-be-possible-for-search-strings-with-a-valid-formatJacob Vosmaer (GitLab)2016-06-071-2/+15
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Workhorse to serve raw diffs Fixes (partially) #13999 Dependent on: gitlab-org/gitlab-workhorse!45 See merge request !4130
| * | | | | | | | | Workhorse to serve raw diffsZeger-Jan van de Weg2016-06-031-2/+15
| | | | | | | | | |
* | | | | | | | | | Merge branch 'rename-ci-commit-phase-3' into 'master' Douwe Maan2016-06-071-5/+5
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename ci_commit in application code This is third iteration of renaming `[ci_]commit(s)` in application code to `pipeline(s)`. See merge request !4464
| * \ \ \ \ \ \ \ \ \ Merge branch 'rename-ci-commit-phase-2' into rename-ci-commit-phase-3Kamil Trzcinski2016-06-072-4/+4
| |\ \ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ \ Merge branch 'rename-ci-commit-phase-2' into rename-ci-commit-phase-3Kamil Trzcinski2016-06-061-1/+1
| |\ \ \ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ \ \ Merge branch 'rename-ci-commit-phase-2' into rename-ci-commit-phase-3Kamil Trzcinski2016-06-0625-313/+316
| |\ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | | Rename all ci_commit[s] in application code to pipeline[s]Kamil Trzcinski2016-06-031-5/+5
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | Merge branch 'rename-ci-commit-phase-2' into 'master' Douwe Maan2016-06-075-10/+10
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |_|_|/ / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename Ci::Commit in specs This is second iteration of renaming Ci::Commit occurences, this time I try to rename all `let's` and `factories` to match what type of object is created: 1. Rename factories: `ci_[...]_commit_[...]` to `ci_[...]_pipeline_[...]`, 2. Rename all `let's(:[ci_]commit)` to `let(:pipeline)`, 3. Rename all occurrences of `[ci_]commit` to `pipeline` if Pipeline object is created cc @grzesiek @DouweM See merge request !4463