summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Expose shared groups for projectsapi-shared-groupsRobert Schilling2016-07-081-0/+11
|
* Merge branch 'new-diff-notes' into 'master' Douwe Maan2016-07-0715-83/+580
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New diff notes Fixes #12732, #14731, #19375, #14783 Builds on https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4110 To do: - [x] Get it mostly working - [x] Validate position validity - [x] Fix: Don’t link to `#` - [x] Fix: Base ref can be `nil`, potentially, when the MR has an oprhan source branch => Yep, doesn’t work. We need to store a `start_id` - [x] Optimize: Fewer duplicate `git diff` compares - [x] Optimize: Pass paths to `PositionTracer#diff` for faster diffs - [x] Refactor: Use `head_id` in `MergeRequest`/`MergeRequestDiff` instead of `source_sha` - [x] Refactor: Convert existing array-based diff refs to the DiffRefs model - [x] Tweak: Use `note_type` in `Autosave` key - [x] Tweak: Remove `line_code: note.line_code` from `link_to_reply_discussion` - [x] Update: `SentNotifications` and reply-by-email receiver - [x] Update: MR diff notification email - [x] Update: API (MR, Commit note creation and entity) - [x] Update: GitHub importer - [x] Address any other TODO comments - [x] Fix: Suppress "edited 4 minutes ago" - [x] Write tests - [x] `LineMapper` - [x] `PositionTracer` - [x] `Position` - [x] `DiffPositionUpdateService` - [x] `DiffNote` - [x] `MergeRequests::RefreshService` / `MergeRequest#update_diff_notes_positions` - [x] Make sure commits with diff notes don't get cleaned up, since this would prevent the diff notes from being rendered (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5062) Future improvements: - Display unresolved comments on files outside the diff, if the comment was added when that file _was_ part of the diff - Allow commenting on sections between hunks, when expanding the diff using `...` - (We'd need to generate line code based on Position if we have it, even if it falls outside bounds of diff) - `diff_hunk` on diff note API entity - Show diff hunk in notification email - Resolved line notes would have a boolean, and be inactive through `notes.any? { !active? || resolved? }` - Multi line notes would store a number of positions, and do the right thing (™) in grouping and then rendering if the first item is multiline? => true - Image diff notes could store x,y,width,height instead of old_line,new_line for similar grouping. Does it need a reference to say if it's on old or new? These can't have line_codes, clearly. Rendering would be interesting. - Show commit line comments in the MR diff - Comment on specific selected words - Comment on file header - Unfold top of discussion diff note - New diff notes API for commits and MRs /cc @rspeicher See merge request !4101
| * Remove duplication, unused methods, and some other style thingsDouwe Maan2016-07-062-9/+9
| |
| * Add some more code comments.Douwe Maan2016-07-063-1/+16
| |
| * Add send_git_patch helperDouwe Maan2016-07-061-3/+3
| |
| * Display new diff notes and allow creation through the web interfaceDouwe Maan2016-07-061-3/+13
| |
| * Allow reply-by-email with diff notesDouwe Maan2016-07-061-9/+1
| |
| * Add Gitlab::Git::PositionTracerDouwe Maan2016-07-061-0/+168
| |
| * Add Gitlab::Diff::LineMapperDouwe Maan2016-07-061-0/+64
| |
| * Add Gitlab::Git::PositionDouwe Maan2016-07-062-0/+182
| |
| * Extract parts of LegacyDiffNote into DiffOnNote concern and move part of ↵Douwe Maan2016-07-065-26/+38
| | | | | | | | responsibility to other classes
| * Style diff and blob file headers the same wayDouwe Maan2016-07-061-10/+5
| |
| * Add DiffFile#blob and #old_blobDouwe Maan2016-07-061-5/+21
| |
| * Add Timeless helper module to prevent updated_at from being updatedDouwe Maan2016-07-061-0/+16
| |
| * Represent DiffRefs as proper class instead of tuple arrayDouwe Maan2016-07-065-22/+49
| |
| * Rename MergeRequest methods that return commits or shas to be more clear and ↵Douwe Maan2016-07-062-4/+4
| | | | | | | | consistent
* | Merge branch 'fix/import-export-log' into 'master' Rémy Coutable2016-07-072-2/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | Fix log statements in import/export Fixes - as seen in the logs: ``` Import/Export error raised on /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/import_export/file_importer.rb:19:in `rescue in import': undefined method `message' for #<String:0x007fc45e977e10> ``` See merge request !5129
| * fix log statements in import/exportJames Lopez2016-07-072-2/+2
| |
* | Consider that a GH exists only if both `ref`, and `sha` existDouglas Barbosa Alexandre2016-07-061-4/+8
| |
* | Doesn't trigger Git hooks when cleaning up restored branches from GitHubDouglas Barbosa Alexandre2016-07-061-1/+3
| |
* | Merge branch 'gh-labels' into 'master' Robert Speicher2016-07-061-2/+6
|\ \ | | | | | | | | | | | | | | | | | | Allow `?`, or `&` for label names Closes #18727 See merge request !4724
| * | Use CGI.unescapeHTML rather than doing the gsub with a mapDouglas Barbosa Alexandre2016-07-051-1/+1
| | |
| * | Move `unescape_html_entities` from LabelsHelper to Label modelDouglas Barbosa Alexandre2016-07-051-1/+1
| | |
| * | Render references for labels that name contains ?, or &Douglas Barbosa Alexandre2016-07-051-2/+6
| | |
* | | Merge branch 'fix/import-url-validator' into 'master' Robert Speicher2016-07-061-1/+9
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | Fixing URL validation for import_url on projects Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/17536 This MR fixes problems related to bypassing `import_url` validation on projects. This makes sure the URL is properly validated so we don't enter crap and fail while running workers that handle this URL. It also adds a migration to fix current invalid `import_url`s See merge request !4753
| * | few more changes from suggestionsJames Lopez2016-06-301-1/+0
| | |
| * | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵James Lopez2016-06-3024-266/+358
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | fix/import-url-validator # Conflicts: # spec/models/project_spec.rb
| * | | use class methodJames Lopez2016-06-301-7/+8
| | | |
| * | | few changes based on feedbackJames Lopez2016-06-301-1/+9
| | | |
* | | | Merge branch 'fix/project-export-error' into 'master' Rémy Coutable2016-07-063-3/+5
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | Add more debug info to import/export and memory killer This should help debug https://gitlab.com/gitlab-org/gitlab-ce/issues/19124 further See merge request !5108
| * | | fix typofix/project-export-errorJames Lopez2016-07-061-1/+1
| | | |
| * | | even more debugJames Lopez2016-07-063-3/+5
| | | |
* | | | Revert back to not defining a default Git access protocol.Patricio Cano2016-07-051-1/+1
| | | |
* | | | Default Git access protocol to `web`Patricio Cano2016-07-052-5/+3
| | | |
* | | | Rename `enabled_git_access_protocols` to singular.Patricio Cano2016-07-051-2/+2
| | | |
* | | | Don't allow empty strings in the `protocol` check.Patricio Cano2016-07-051-1/+1
| | | |
* | | | Correct access control flow for Git HTTP requests.Patricio Cano2016-07-051-4/+4
| | | |
* | | | Clarify protocol access check, and make Git HTTP access call more specific.Patricio Cano2016-07-051-1/+1
| | | |
* | | | Raise an error if no protocol is passed to the GitAccess check.Patricio Cano2016-07-052-2/+3
| | | |
* | | | Rename ENV['PROTOCOL'] to ENV['GL_PROTOCOL'] to conform to what GitLab Shell ↵Patricio Cano2016-07-052-11/+5
| | | | | | | | | | | | | | | | expects and make the `protocol` param in `GitAccess` mandatory.
* | | | Only allow Git Access on the allowed protocolPatricio Cano2016-07-054-5/+37
| | | |
* | | | Merge branch 'update-gemoji' into 'master' Robert Speicher2016-07-053-3/+24
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add lib/gitlab/emoji.rb instead of gitlab_emoji gem and upgrade Gemojione - No reason to split it into a separate gem when the gem barely did anything. We can use gemojione directly, making updating gemojione that much easier. Unless there's a particularly good reason we were using the gem? - Fixes the Rake task since it broke after all the AwardEmoji changes. - Update gemojione to 2.6.1. Spring Update changes! http://emojione.com/releases/#2.2.0 See merge request !4919
| * | | Add emoji.rb in lib/gitlab instead of using the gitlab_emoji gem.update-gemojiConnor Shea2016-06-293-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No reason to split it into a separate gem when the gem barely did anything. We can use gemojione directly, making updating gemojione that much easier. Also fix the Rake task and update gemojione to 2.6.1. This adds the EmojiOne Spring update. Changelog: https://github.com/jonathanwiesel/gemojione/blob/master/CHANGELOG.md
* | | | RailsCache metrics now includes fetch_hit/fetch_miss and read_hit/read_miss ↵Paco Guzman2016-07-051-2/+12
| | | | | | | | | | | | | | | | info.
* | | | Instrument cache fetch hit and cache fetch missesPaco Guzman2016-07-051-0/+12
| | | |
* | | | Merge branch 'refactor/ci-config-move-global-entries' into 'master' Rémy Coutable2016-07-0519-139/+364
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move global ci entries handling from legacy to new config ## What does this MR do? This MR moves responsibility of handling global CI config entries (like `image`, `services`), from legacy `GitlabCiYamlProcessor` to new CI Config ## Why was this MR needed? This is the next iteration of CI configuration refactoring ## What are the relevant issue numbers? #15060 ## Does this MR meet the acceptance criteria? - Tests - [x] Added for this feature/bug - [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 you do - rebase it please) See merge request !4820
| * | | | Add minor improvements in readability in CI configrefactor/ci-config-move-global-entriesGrzegorz Bizon2016-07-043-4/+3
| | | | |
| * | | | Extract CI configuration entry node factory methodGrzegorz Bizon2016-07-041-8/+12
| | | | |
| * | | | Improve description of CI types node and in specsGrzegorz Bizon2016-06-301-1/+1
| | | | |
| * | | | Explicitly define entry node class in new CI configGrzegorz Bizon2016-06-292-11/+11
| | | | |