summaryrefslogtreecommitdiff
path: root/app/models
Commit message (Collapse)AuthorAgeFilesLines
* remove public field from namespace and refactoringnamespace-clean_upValery Sizov2016-01-042-9/+1
|
* Merge branch 'fix/missing-ci-build-traces' into 'master' Grzegorz Bizon2015-12-301-3/+55
|\ | | | | | | | | | | | | Hotfix for builds trace data integrity Closes #4246 See merge request !2224
| * Add hotfix that allows to access build artifacts created before 8.3fix/missing-ci-build-tracesGrzegorz Bizon2015-12-291-3/+34
| | | | | | | | | | | | | | | | | | | | | | This is a temporary hotfix that allows to access build artifacts created before 8.3. See #5257. This needs to be changed after migrating CI build files. Note that `ArtifactUploader` uses `artifacts_path` to create a storage directory before and after parsisting `Ci::Build` instance, before and after moving a file to store (save and fetch a file).
| * Hotfix for builds trace data integrityGrzegorz Bizon2015-12-281-1/+22
| | | | | | | | Issue #4246
* | Fix project transfer e-mail sending incorrect paths in e-mail notificationStan Hu2015-12-291-1/+3
| | | | | | | | | | | | | | | | | | The introduction of ActiveJob and `deliver_now` in 7f214cee7 caused a race condition where the mailer would be invoked before the project was committed to the database, causing the transfer e-mail notification to show the old path instead of the new one. Closes #4670
* | Merge branch 'upvote_count_to_api' into 'master' Valery Sizov2015-12-292-8/+4
|\ \ | | | | | | | | | | | | | | | | | | Revert upvotes and downvotes params back to MR API issue https://gitlab.com/gitlab-org/gitlab-ce/issues/3672 See merge request !2212
| * | note votes methids implementationupvote_count_to_apiValery Sizov2015-12-291-2/+2
| | |
| * | Revert upvotes and downvotes params to MR APIValery Sizov2015-12-282-6/+2
| | |
* | | reCAPTCHA is configurable through Admin Settings, no reload needed.Gabriel Mazetto2015-12-281-10/+18
| | |
* | | Merge branch 'disable-git-follow' into 'master' Dmitriy Zaporozhets2015-12-281-1/+3
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable --follow in `git log` to avoid loading duplicate commit data in infinite scroll `git` doesn't work properly when `--follow` and `--skip` are specified together. We could even be **omitting commits in the Web log** as a result. Here are the gory details. Let's say you ran: ``` git log -n=5 --skip=2 README ``` This is the working case since it omits `--follow`. This is what happens: 1. `git` starts at `HEAD` and traverses down the tree until it finds the top-most commit relevant to README. 2. Once this is found, this commit is returned via `get_revision_1()`. 3. If the `skip_count` is positive, decrement and repeat step 2. Otherwise go onto step 4. 4. `show_log()` gets called with that commit. 5. Repeat step 1 until we have all five entries. That's exactly what we want. What happens when you use `--follow`? You have to understand how step 1 is performed: * When you specify a pathspec on the command-line (e.g. README), a flag `prune` [gets set here](https://github.com/git/git/blob/master/revision.c#L2351). * If the `prune` flag is active, `get_commit_action()` determines whether the commit should be [scanned for matching paths](https://github.com/git/git/blob/master/revision.c#L2989). * In the case of `--follow`, however, `prune` is [disabled here](https://github.com/git/git/blob/master/revision.c#L2350). * As a result, a commit is never scanned for matching paths and therefore never pruned. `HEAD` will always get returned as the first commit, even if it's not relevant to the README. * Making matters worse, the `--skip` in the example above would actually skip a every other entry after `HEAD` N times. If README were changed in these skipped commits, we would actually miss information! Since git uses a matching algorithm to determine whether a file was renamed, I believe `git` needs to generate a diff of each commit to do this and traverse each commit one-by-one to do this. I think that's the rationale for disabling the `prune` functionality since you can't just do a simple string comparison. Closes #4181, #4229, #3574, #2410 See merge request !2210
| * | Disable --follow in `git log` to avoid loading duplicate commit data in ↵Stan Hu2015-12-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | infinite scroll `git` doesn't work properly when `--follow` and `--skip` are specified together. We could even be **omitting commits in the Web log** as a result. Here are the gory details. Let's say you ran: ``` git log -n=5 --skip=2 README ``` This is the working case since it omits `--follow`. This is what happens: 1. `git` starts at `HEAD` and traverses down the tree until it finds the top-most commit relevant to README. 2. Once this is found, this commit is returned via `get_revision_1()`. 3. If the `skip_count` is positive, decrement and repeat step 2. Otherwise go onto step 4. 4. `show_log()` gets called with that commit. 5. Repeat step 1 until we have all five entries. That's exactly what we want. What happens when you use `--follow`? You have to understand how step 1 is performed: * When you specify a pathspec on the command-line (e.g. README), a flag `prune` [gets set here](https://github.com/git/git/blob/master/revision.c#L2351). * If the `prune` flag is active, `get_commit_action()` determines whether the commit should be [scanned for matching paths](https://github.com/git/git/blob/master/revision.c#L2989). * In the case of `--follow`, however, `prune` is [disabled here](https://github.com/git/git/blob/master/revision.c#L2350). * As a result, a commit is never scanned for matching paths and therefore never pruned. `HEAD` will always get returned as the first commit, even if it's not relevant to the README. * Making matters worse, the `--skip` in the example above would actually skip every other after `HEAD` N times. If README were changed in these skipped commits, we would actually miss information! Since git uses a matching algorithm to determine whether a file was renamed, I believe `git` needs to generate a diff of each commit to do this and traverse each commit one-by-one to do this. I think that's the rationale for disabling the `prune` functionality since you can't just do a simple string comparison. Closes #4181, #4229, #3574, #2410
* | | Merge branch 'mention-all' into 'master' Robert Speicher2015-12-271-1/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | Only allow group/project members to mention `@all` Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/3473 See merge request !2205
| * | Merge branch 'master' into mention-allDouwe Maan2015-12-242-8/+9
| |\ \ | | |/
| * | Only allow group/project members to mention `@all`Douwe Maan2015-12-241-1/+1
| | |
* | | Merge branch 'revert_votes_back' into 'master' Dmitriy Zaporozhets2015-12-251-1/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert vote buttons back to issue and MR pages https://gitlab.com/gitlab-org/gitlab-ce/issues/3672 /cc @dzaporozhets @JobV ![joxi_screenshot_1450809309400](/uploads/379a75505e0d5f24e743aa0a6a6684e2/joxi_screenshot_1450809309400.png) See merge request !2206
| * | | revert back vote buttons to issue and MR pagesValery Sizov2015-12-251-1/+8
| | | |
* | | | Merge branch 'rs-opengraph' into 'master' Douwe Maan2015-12-251-0/+8
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | Add Open Graph meta tags See merge request !2192
| * | | Add support for `twitter:label` meta tagsrs-opengraphRobert Speicher2015-12-241-0/+8
| | | |
* | | | WIP require two factor authenticationGabriel Mazetto2015-12-241-26/+33
| |_|/ |/| |
* | | Merge branch 'master' of github.com:gitlabhq/gitlabhqRobert Speicher2015-12-241-8/+8
|\ \ \
| * \ \ Merge pull request #9915 from huacnlee/avoid-ability-methods-allocationsDmitriy Zaporozhets2015-12-241-8/+8
| |\ \ \ | | |_|/ | |/| | Avoid allocations in Ability class.
| | * | Avoid allocations in Ability class.Jason Lee2015-12-161-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It won't change anything after they are first invoke, so add method cache to avoid allocations and avoid GC. Benchmarks: ``` Calculating ------------------------------------- project_guest_rules without method cache 79.352k i/100ms project_guest_rules with method cache 93.634k i/100ms ------------------------------------------------- project_guest_rules without method cache 2.865M (±32.5%) i/s - 11.982M project_guest_rules with method cache 4.419M (± 7.4%) i/s - 22.004M Comparison: project_guest_rules with method cache: 4418908.0 i/s project_guest_rules without method cache: 2864514.0 i/s - 1.54x slower Calculating ------------------------------------- project_report_rules without method cache 53.126k i/100ms project_report_rules with method cache 97.473k i/100ms ------------------------------------------------- project_report_rules without method cache 1.093M (±36.5%) i/s - 4.675M project_report_rules with method cache 4.420M (± 7.2%) i/s - 22.029M Comparison: project_report_rules with method cache: 4420054.3 i/s project_report_rules without method cache: 1092509.6 i/s - 4.05x slower ``` https://gist.github.com/huacnlee/b04788ae6df42fe769e4
* | | | Merge branch 'ldap-special-chars-fix' into 'master' Douwe Maan2015-12-241-0/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix identity and user retrieval when special characters are used Fixes #4023 I also added tests to make sure the user with special characters in his name is returned correctly. @rspeicher this probably should be added to 8.3 as a patch. See merge request !2176
| * | | Fix identity and user retrieval when special characters are usedPatricio Cano2015-12-221-0/+1
| | | |
* | | | Merge branch 'fix-milestones-with-slashes' into 'master' Dmitriy Zaporozhets2015-12-241-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Error 500 when global milestones have slashes * Closes #4226 * Closes https://github.com/gitlabhq/gitlabhq/issues/9921 See merge request !2182
| * | | | Fix Error 500 when global milestones have slashesStan Hu2015-12-221-1/+1
| |/ / / | | | | | | | | | | | | Closes #4226
* | | | Merge branch 'edit-on-fork' into 'master' Dmitriy Zaporozhets2015-12-241-26/+33
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Automatically fork a project when not allowed to edit a file. Fixes #3215. To do: - [ ] Add tests ----- ## "Edit" button on file in a project the user does NOT have write access to ![edit_file](/uploads/7602157420768aef483a6586bba2d164/edit_file.png) ## Clicking will automatically create a fork ![during_fork](/uploads/32f4f5dff9f24ea99522000b0bf881c5/during_fork.png) ## When the fork has been created, the user is returned to the edit page on the original project with a notice ![edit_notice](/uploads/94ed1319404370ff1e9c0d672fb41e03/edit_notice.png) ## The user cannot change the target branch and is informed that editing will start an MR ![edit_footer](/uploads/4da68d4795c7177e575b7c434d16eeae/edit_footer.png) ## Hitting "Commit changes" will commit and start an MR from my fork to the origin project ![Screen_Shot_2015-12-17_at_23.38.08](/uploads/d777a4db6f38a5a1be84031694465bc1/Screen_Shot_2015-12-17_at_23.38.08.png) ----- ## "Create file, "Upload file" and "New directory" buttons in a project the user does NOT have write access to ![new_directory](/uploads/72f556248f30d6652523bbb4be01b3e0/new_directory.png) ## Clicking any of these options will automatically create a fork ![during_fork](/uploads/32f4f5dff9f24ea99522000b0bf881c5/during_fork.png) ## When the fork has been created, the user is returned to the tree page on the original project with a notice ![new_directory_notice](/uploads/a1a3e11308ae0e8f0913fae6813a37ed/new_directory_notice.png) ## Clicking "New directory" again will show the modal. The user cannot change the target branch and is informed that editing will start an MR ![new_dir](/uploads/99ca8cbfb2f70603e352b3fdf67b6281/new_dir.png) ## Hitting "Create directory" will commit and start an MR from my fork to the origin project ![Screen_Shot_2015-12-17_at_23.39.19](/uploads/3713d0235abf831361b803a6198c5bc1/Screen_Shot_2015-12-17_at_23.39.19.png) cc @dzaporozhets @skyruler See merge request !2145
| * | | | Automatically fork a project when not allowed to edit a file.Douwe Maan2015-12-181-26/+33
| | | | |
* | | | | Merge branch 'fix/visibility-level-setting-in-forked-projects' into 'master' Douwe Maan2015-12-241-3/+24
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix/visibility level setting in forked projects Fixes #3136 /cc @DouweM See merge request !1744
| * | | | Merge branch 'master' into fix/visibility-level-setting-in-forked-projectsTomasz Maczukin2015-12-2162-1336/+1089
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (723 commits) Bump Rack Attack to v4.3.1 for security fix Remove duplicate entry in the changelog Remove extra spaces after branchname Fix merge-request-reopen button title Add branch and tag operation to tree dropdown Use gitlab-shell 2.6.9 Clarify Windows shell executor artifact upload support Fix feature specs: we always show the build status if ci_commit is present Do not display project group/name when issue and MR are in same project Don't create CI status for refs that doesn't have .gitlab-ci.yml, even if the builds are enabled Use gitlab-workhorse 0.5.1 Fix ci_projects migration by using the value only from latest row [ci skip] Revert sidebar position for issue and merge request Add info on using private Docker registries in CI [ci skip] Upgrade Poltergeist to 1.8.1. #4131 Fix ux issue with "This issue will be closed automatically" message Move MR Builds tab next to Commits Api support for requesting starred projects for user Fix Rubocop complain. Fix merge widget JS for buttons ... Conflicts: app/models/project.rb
| * \ \ \ \ Merge branch 'master' into fix/visibility-level-setting-in-forked-projectsTomasz Maczukin2015-11-2045-357/+627
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (296 commits) fox tests Don't rescue Exception, but StandardError adressing comments Update gitlab-shell documentation [ci skip] Align hash literals in IssuesFinder spec Fix tests Fix 'Attach a file' link in new tag form Add link to git-lfs client [ci skip] Do not limit workhorse POST/PUT size in NGINX added specs added spinach tests Since GitLab CI is enabled by default, remove enabling it by pushing .gitlab-ci.yml Fix tests Commits without .gitlab-ci.yml are marked as skipped Changelog entry for finding issues performance Use a JOIN in IssuableFinder#by_project Memoize IssuableFinder#projects Removed trailing whitespace from IssuableFinder Added benchmark for IssuesFinder Updated DB schema with new issues/projects indexes ... Conflicts: app/models/project.rb
| * | | | | | Change update_forks_visibility_level into after_update hook in Project modelTomasz Maczukin2015-11-201-0/+13
| | | | | | |
| * | | | | | Change forks method to has_many relationTomasz Maczukin2015-11-181-6/+5
| | | | | | |
| * | | | | | Merge branch 'master' into fix/visibility-level-setting-in-forked-projectsTomasz Maczukin2015-11-066-7/+15
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Add CI permissions and api links to README [ci skip] Remove duplicate documentation links make migrations reversible Add missing stage to builds view CI details cleanup Allow groups to appear in the search results if the group owner allows it Update installation.md update example of regex for pytest-cov
| * \ \ \ \ \ \ Merge branch 'master' into fix/visibility-level-setting-in-forked-projectsTomasz Maczukin2015-11-042-11/+11
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (23 commits) Use single spaces Improvements to profile page UI Replace all usages of `git` command with configurable binary path Update Shell Commands doc for configurable git binary path Minor reformatting for Facebook integration doc Use proper labels for OAuth providers Add Facebook authentication Bump stamp to ~> 0.6.0 Add extra padding between user description and links on profile page Fix tests Fix clipboard button overflow Apply new design for user profile page Improve profile page UI Better name for up-level links Fixed User sorting specs Only sort by IDs by default Added benchmark for User.all Add changelog entry for contacted_at Spread out runner contacted_at updates Only redirect to homepage url when its not the root url ...
| * | | | | | | | Update forks visibility_level after parent project visibility_level changeTomasz Maczukin2015-11-041-1/+5
| | | | | | | | |
| * | | | | | | | Fix Project update serviceTomasz Maczukin2015-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When project is updated and it is a fork, then visibility_level should not be less restrictive than in its parent project.
| * | | | | | | | Move visibility_level check for forked projects to Project modelTomasz Maczukin2015-11-031-0/+5
| | | | | | | | |
* | | | | | | | | Use method that creates runners registration tokenGrzegorz Bizon2015-12-232-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `runners_registration_token` now creates a new token if it is blank.
* | | | | | | | | Add method that persist ensured token in `TokenAuthenticatable`Grzegorz Bizon2015-12-231-2/+13
| | | | | | | | |
* | | | | | | | | Fix method that ensures authentication tokenGrzegorz Bizon2015-12-231-6/+2
| |_|_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, `ensure_#{token_filed_name}` method didn't persist new token in database. This closes #4235.
* | | | | | | | Deprecate GitLabCiService making it to always be inactiveKamil Trzcinski2015-12-221-1/+6
| | | | | | | |
* | | | | | | | Merge branch 'fix-issue-related-mrs' into 'master' Robert Speicher2015-12-212-2/+2
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix issue related cross-project MRs Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/4188 See merge request !2163
| * | | | | | | | Fix issue related cross-project MRsfix-issue-related-mrsDouwe Maan2015-12-212-2/+2
| | |_|_|_|/ / / | |/| | | | | |
* | | | | | | | Merge branch 'add_email_unlock' into 'master' Robert Speicher2015-12-211-0/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow account unlock via email We see a lot of users get confused about what it means when your account gets locked. Many try to reset their password and are still faced with a lockout. With this change, users receive an email that allows them to unlock their account immediately. The previous behavior where the account is auto-unlocked after a time also still works. See merge request !2049
| * | | | | | | | Allow account unlock via emailDrew Blessing2015-12-141-0/+1
| | |_|_|_|_|_|/ | |/| | | | | |
* | | | | | | | Merge branch 'issue_3452'Douwe Maan2015-12-211-0/+10
|\ \ \ \ \ \ \ \
| * | | | | | | | Add link to MR from Build detail page. #3452Rubén Dávila2015-12-161-0/+10
| | | | | | | | |
* | | | | | | | | Merge branch 'coverage-regex' into 'master' Douwe Maan2015-12-211-1/+2
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix build coverage regex matching to allow captures. Fixes #2644 /cc @DouweM See merge request !2138
| * | | | | | | | | Fix build coverage regex.Jared Szechy2015-12-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a spec for regex captures as well. Fixes #2644