summaryrefslogtreecommitdiff
path: root/app/models
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * | | | | Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into ↵Jeroen Nijhof2016-01-206-21/+24
| | | |\ \ \ \ \ | | | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sentry-integration Conflicts: db/schema.rb
| | | * | | | | Add sentry integrationJeroen Nijhof2016-01-181-0/+6
| | | | |/ / / | | | |/| | |
| | * | | | | Merge branch 'issue_3749' into 'master' Douwe Maan2016-01-201-1/+1
| | |\ \ \ \ \ | | | |_|/ / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update Issues/MRs updated_at field when notes are generated Closes #3749 and #9130 See merge request !2493
| | | * | | | Update Issue/MR everytime a Note is saved/destroyed.Rubén Dávila2016-01-191-1/+1
| | | |/ / /
| * | | | | Save and use actual diff base commit for MR diff highlightingDouwe Maan2016-01-202-3/+21
| | | | | |
| * | | | | Fix MR diff_refsDouwe Maan2016-01-201-2/+2
| | | | | |
| * | | | | Merge branch 'master' into issue_3945Douwe Maan2016-01-2013-31/+42
| |\ \ \ \ \ | | |/ / / /
| * | | | | Check if MR is not broken.Rubén Dávila2016-01-191-1/+1
| | | | | |
| * | | | | Merge branch 'master' into issue_3945Rubén Dávila2016-01-1457-268/+557
| |\ \ \ \ \
| * | | | | | More refactoring from last code review. #3945Rubén Dávila2016-01-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use commit objects instead of IDs when generating diffs * Use proper references when generating MR's source and target * Update broken specs
* | | | | | | WIP lazy blobsJacob Vosmaer2016-02-012-1/+7
| |_|/ / / / |/| | | | |
* | | | | | Merge branch 'user-ldap-email' into 'master' Robert Speicher2016-01-191-1/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow LDAP users to change their email if it was not set by the LDAP server Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/3054 See merge request !2502
| * \ \ \ \ \ Merge branch 'master' into user-ldap-emailDouwe Maan2016-01-195-20/+16
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # db/schema.rb
| * | | | | | | Allow LDAP users to change their email if it was not set by the LDAP serverDouwe Maan2016-01-191-1/+4
| | |_|_|/ / / | |/| | | | |
* | | | | | | Merge branch 'add-public-param-to-project-api' into 'master' Dmitriy Zaporozhets2016-01-191-0/+4
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add public params to GET /projects api. Closes #3788 See merge request !2409
| * | | | | | Add specs. Adjust filter.Josh Frye2016-01-191-1/+1
| | | | | | |
| * | | | | | Change 'public' flag to more robust 'visibility' query.Josh Frye2016-01-191-0/+4
| |/ / / / /
* | | | | | Greatly improve external_issue_tracker performanceimprove-project-external-issue-trackersYorick Peterse2016-01-195-20/+16
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This greatly improves the performance of Project#external_issue_tracker by moving most of the fields queried in Ruby to the database and letting the database handle all logic. Prior to this change the process of finding an external issue tracker was along the lines of the following: 1. Load all project services into memory. 2. Reduce the list to only services where "issue_tracker?" returns true 3. Reduce the list from step 2 to service where "default?" returns false 4. Find the first service where "activated?" returns true This has to two big problems: 1. Loading all services into memory only to reduce the list down to a single item later on is a waste of memory (and slow timing wise). 2. Calling Array#select followed by Array#reject followed by Array#find allocates extra objects when this really isn't needed. To work around this the following service fields have been moved to the database (instead of being hardcoded): * category * default This in turn means we can get the external issue tracker using the following query: SELECT * FROM services WHERE active IS TRUE AND default IS FALSE AND category = 'issue_tracker' AND project_id = XXX LIMIT 1 This coupled with memoizing the result (just as before this commit) greatly reduces the time it takes for Project#external_issue_tracker to complete. The exact reduction depends on one's environment, but locally the execution time is reduced from roughly 230 ms to only 2 ms (= a reduction of almost 180x). Fixes gitlab-org/gitlab-ce#10771
* | | | | Merge branch 'hook_url_limit' into 'master' Dmitriy Zaporozhets2016-01-184-8/+8
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Raise hook url limit 1. Up varchar url limit to 2000 chars instead 255 2. Maybe migration? 3. 255 characters - it is not enough 4. nil 5. nil See merge request !1940
| * | | | | Raise hook url limitKirilll Zaycev2016-01-154-8/+8
| | | | | |
* | | | | | Use a more sensible message for the AbuseReport uniqueness validationrs-abuse-report-validationRobert Speicher2016-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously it was "user has already been taken", when really we were saying the user has already been reported.
* | | | | | Merge branch 'ci/build_dependencies' into 'master' Douwe Maan2016-01-151-0/+8
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let the CI runner know about builds that this build depends on This allows us to implement artifacts passing: runner will download artifacts from all prior builds. It will happen automatically, and always, as long as artifacts are enabled. ## The changes: This MR exposes list of prior builds in CI::API::Builds. **The API response when asking for builds** ```json { "id": 48584, "ref": "0.1.1", "tag": true, "sha": "d63117656af6ff57d99e50cc270f854691f335ad", "status": "success", "name": "pages", "token": "9dd60b4f1a439d1765357446c1084c", "stage": "test", "project_id": 479, "project_name": "test", "commands": "echo commands", "repo_url": "http://gitlab-ci-token:token@gitlab.example/group/test.git", "before_sha": "0000000000000000000000000000000000000000", "allow_git_fetch": false, "options": { "image": "docker:image", "artifacts": { "paths": [ "public" ] }, "cache": { "paths": [ "vendor" ] } }, "timeout": 3600, "variables": [ { "key": "CI_BUILD_TAG", "value": "0.1.1", "public": true } ], "dependencies": { "builds": [ { "id": 48584, "ref": "0.1.1", "tag": true, "sha": "d63117656af6ff57d99e50cc270f854691f335ad", "status": "success", "name": "build", "token": "9dd60b4f1a439d1765357446c1084c", "stage": "build", "project_id": 479, "project_name": "test", "artifacts_file": { "filename": "artifacts.zip", "size": 0 } } ] } } ``` ## How it will work? **Example:** ``` build: type: build script: - echo TEST > test_file artifacts: untracked: true rspec: type: test script: - test-my-project staging: type: deploy script: - scp test_file root@server.com: ``` **The flow:** 1. We run `build`. The `build` creates a file `test_file`. This file gets archived and send us build artifacts. 2. We run `rspec`. The `rspec` downloads build artifacts from `build`. Uses the `test_file`. 3. We run `staging`. The `staging` downloads build artifacts from `build` and `rspec`, but since the `rspec` doesn't have build artifacts we skip that build. Deploys the `test_file`. This partially implements the https://gitlab.com/gitlab-org/gitlab-ce/issues/3423. In the next release we will introduce option to configure what artifacts are received. /cc @grzesiek @DouweM @sytse @rspeicher See merge request !2437
| * | | | | | Let the CI runner know about builds that this build depends onci/build_dependenciesKamil Trzcinski2016-01-141-0/+8
| |/ / / / / | | | | | | | | | | | | | | | | | | This allows us to implement artifacts passing: runner will download artifacts from all prior builds
* | | | | | Give reporters the ability to download artifacts.Andrew Johnson2016-01-151-1/+1
| |_|/ / / |/| | | | | | | | | | | | | | Also fix a few places where page_404 should be render_404.
* | | | | Merge branch 'master' into ci/api-triggersTomasz Maczukin2016-01-147-19/+56
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (150 commits) fixes margin and padding Update mailroom/postfix documentation [ci skip] Fix css mess around git clone panel. Align it properly Fix missing padding for user/group pages Fix parse_gollum_tags matcher Update documentation on Banzai::Filter::GollumTagsFilter Add tests for the wiki pipeline Refactoring Banzai::Filter::GollumTagsFilter Make sure the .git is at the end on Gitlab::GithubImport::WikiFormatter Remove GollumTagsPipeline Refactoring Gitlab::GithubImport::Importer Remove unnecessary brackets on WIKI_SLUG_ID route constraints Move js function to removing accents to vendor/assets/javascripts Update CHANGELOG Use the WikiPipeline when rendering the wiki markdown content Add Banzai::Filter::GollumTagsFilter for parsing Gollum's tags in HTML Relax constraints for wiki slug Import GitHub wiki into GitLab Move Ci::Build#available_statuses to AVAILABLE_STATUSES constant in CommitStatus Revert changes to how the notes are paginated in the API ... Conflicts: doc/api/README.md lib/api/entities.rb
| * | | | Merge branch 'ci/api-builds' into 'master' Douwe Maan2016-01-141-0/+2
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add builds API References #4264 See merge request !2207
| | * | | | Move Ci::Build#available_statuses to AVAILABLE_STATUSES constant in CommitStatusci/api-buildsTomasz Maczukin2016-01-142-4/+2
| | | | | |
| | * | | | Merge branch 'master' into ci/api-buildsTomasz Maczukin2016-01-147-7/+45
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (51 commits) Fix version Fix specs and rubocop warnings Improve the consistency of commit titles, branch names, tag names, issue/MR titles, on their respective project pages fixed LDAP activation on login to use new ldap_blocked state Fix Admin/Users view to position buttons without spacing magic Update to Go 1.5.3 Fix the undefinded variable error in Project's safe_import_url method Update CHANGELOG [ci skip] Add some cosmetic changes to variables API documentation [ci skip] Fix misaligned edit button in milestone collection partial Update button styles for Milestones#show Modify builds API documentation style [ci skip] Modify :ci_variable factory Ensure the API doesn't return notes that the current user shouldn't see Add 'Build' prefix to Variables entry name in API docs index Fix some typos Add spec for Note#cross_reference_not_visible_for? Remove (invalid) timestamp formatting Move `BroadcastMessage#status` to a helper since it's presentational Update CHANGELOG ... Conflicts: doc/api/README.md lib/api/api.rb lib/api/entities.rb
| | * \ \ \ \ Merge branch 'master' into ci/api-buildsTomasz Maczukin2016-01-137-11/+22
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (76 commits) Add Changelog entry for build traces data integrity fix Update doc_styleguide.md [ci skip] Added hint that you can search users by name, username, or email. Add changelog Randomize metrics sample intervals Make the metrics sampler interval configurable Don't automatically require awesome_print Disable colorization if STDOUT is not a tty Block the reported user before destroying the record changes `$quote-gray` to `$secondary-text` makes message plural for multiple MRs and removes from loop. Duh. Prepare Installation and Update docs for 8.4 RC1 Mention channel/key bug in irkerd docs Revert "Remove the `:coffee` and `:coffeescript` Haml filters" gets merge request discussion working again adds back in discussion.haml.html for issues commenting and closing/reopening properly. removing last chunk of MR ajax changes, rest will be in another MR reverting more MR ajax files, will appear in different commit reverting MR ajax changes, which will be in a different MR reverting _mr_title.html.haml ...
| | * \ \ \ \ \ Merge branch 'master' into ci/api-buildsTomasz Maczukin2016-01-1146-199/+333
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (143 commits) Only load autocomplete data when actually needed Check for current user Add pencil icon to edit group settings Issue #5817 wording of the web hooks updated on issue and merge events use JavaScript instead of CoffeeScript in Views, the reason #9819 Before project save ensure that a runners_token exists Fix Error 500 when visiting build page of project with nil runners_token Remove outdated gitlab-git-http-server reference from Install doc Fix typo in build page of projects Update docs for shared runner default settings Disable "Already Blocked" button in admin abuse report page Add CHANGELOG entry for reply-by-email fix Use WOFF versions of SourceSansPro Clean up document on adding users to a project Refactor ZenMode Fix caching issue where build status was not updating in project dashboard Add a CHANGELOG entry for The Most Important Feature of All Time(TM) changes verb `references` to noun `reference`. fixes new branch button positioning, when visible and not visible container DRY up upload and download services ...
| | * | | | | | | Modify builds scope filtering in builds APITomasz Maczukin2016-01-081-0/+4
| | | | | | | | |
| * | | | | | | | Merge branch 'import-gh-wiki' into 'master' Douwe Maan2016-01-142-1/+5
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import GitHub wiki into GitLab Closes #2834 GitHub doesn’t apply any constraints to theirs wiki slug allowing chars like ,, :, *, etc, we need to remove our constraints or some wiki pages will not be available after they are imported. Some wikis use the Gollum's tags to link its internal/external resources like: images, urls, wiki pages, etc. So, to avoid that wiki links/images displays completely broken after they were imported, we added a new `WikiPipeline`, that for now will parse only simple links, and image tags. ##### Before `WikiPipeline`: ![Screenshot_2016-01-11_20.14.48](/uploads/46fd5dbb5acfc70aa8ecca3050b675e4/Screenshot_2016-01-11_20.14.48.png) ##### After `WikiPipeline`: ![Screenshot_2016-01-11_20.15.56](/uploads/b1d94aa852f385f867a7868c358b4257/Screenshot_2016-01-11_20.15.56.png) See merge request !2324
| | * | | | | | | | Add Banzai::Filter::GollumTagsFilter for parsing Gollum's tags in HTMLDouglas Barbosa Alexandre2016-01-141-0/+4
| | | | | | | | | |
| | * | | | | | | | Relax constraints for wiki slugDouglas Barbosa Alexandre2016-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since GitHub doesn’t apply these constraints to theirs wiki slug allowing characters like `,`, `:`, `*`, etc, we need to relax our constraints or some wiki pages will not be available after they were imported. For an example the Devise project have a wiki page with the following slug: “How To: Add sign_in, sign_out, and sign_up links to your layout template”
| * | | | | | | | | Merge branch 'unsubscribe-from-thread-from-email-footer' into 'master' Douwe Maan2016-01-142-3/+15
| |\ \ \ \ \ \ \ \ \ | | |/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unsubscribe from thread through link in email footer Closes #3437 ![Screenshot_from_2015-12-11_15-35-06](/uploads/cfb3d8737d4757f527995411f103d0ce/Screenshot_from_2015-12-11_15-35-06.png) ![Screenshot_from_2015-12-11_15-35-56](/uploads/9b7121be7ce4b05e5995ca6d38c5bea4/Screenshot_from_2015-12-11_15-35-56.png) See merge request !2068
| | * | | | | | | | #can_unsubscribe? -> #?unsubscribable?Zeger-Jan van de Weg2016-01-111-1/+1
| | | | | | | | | |
| | * | | | | | | | Add #can_unsubscribe? to SentNotificationZeger-Jan van de Weg2016-01-091-0/+4
| | | | | | | | | |
| | * | | | | | | | Unsubscribe from thread through link in email footerZeger-Jan van de Weg2016-01-092-3/+11
| | | | | | | | | |
| * | | | | | | | | Merge branch 'ci/view-build-artifacts' into 'master' Grzegorz Bizon2016-01-143-15/+34
| |\ \ \ \ \ \ \ \ \ | | |_|_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add browser for build artifacts Discussion in #3426, closes #3426. See merge request !2123
| | * | | | | | | | Improve readability of artifacts browser `Entry` related codeGrzegorz Bizon2016-01-141-2/+2
| | | | | | | | | |
| | * | | | | | | | Improvements, readability for artifacts browserGrzegorz Bizon2016-01-142-2/+2
| | | | | | | | | |
| | * | | | | | | | Render only valid paths in artifacts metadataGrzegorz Bizon2016-01-141-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this version we will support only relative paths in artifacts metadata. Support for absolute paths will be introduced later.
| | * | | | | | | | Simplify implementation of build artifacts browser (refactoring)Grzegorz Bizon2016-01-141-6/+4
| | | | | | | | | |
| | * | | | | | | | Extract artifacts metadata implementation to separate classGrzegorz Bizon2016-01-141-17/+3
| | | | | | | | | |
| | * | | | | | | | Improve path sanitization in `StringPath`Grzegorz Bizon2016-01-141-5/+5
| | | | | | | | | |
| | * | | | | | | | Parse artifacts metadata stored in JSON formatGrzegorz Bizon2016-01-141-5/+6
| | | | | | | | | |
| | * | | | | | | | Use metadata stored in artifacats metadata fileGrzegorz Bizon2016-01-141-2/+17
| | | | | | | | | |
| | * | | | | | | | Add artifacts metadata uploader filedGrzegorz Bizon2016-01-141-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Artifacts metadata field will be used to store a filename of gzipped file containing metadata definition for given artifacts archive.
| | * | | | | | | | Make some conditions in `Ci::Build` more readableGrzegorz Bizon2016-01-141-4/+6
| | | | | | | | | |
| | * | | | | | | | Add method that checks if artifacts browser is supportedGrzegorz Bizon2016-01-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed because of backward compatibility. Previously artifacts archive had `.tar.gz` format, but artifacts browser requires ZIP format now.