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
AgeCommit message (Collapse)Author
2017-08-22Fix display of push events for removed refsYorick Peterse
This changes the style of push events that remove tags or branches so they don't display the commit details. This prevents displaying commit details such as: 000000 . --broken encoding Instead we now simply display the header such as: Administrator deleted branch example-branch This is displayed in the same style as events for newly created branches/tags. This commit also ensures that if no commit message is present we simply don't display anything, instead of "--broken encoding". Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36685 Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36722
2017-08-10Migrate events into a new formatYorick Peterse
This commit migrates events data in such a way that push events are stored much more efficiently. This is done by creating a shadow table called "events_for_migration", and a table called "push_event_payloads" which is used for storing push data of push events. The background migration in this commit will copy events from the "events" table into the "events_for_migration" table, push events in will also have a row created in "push_event_payloads". This approach allows us to reclaim space in the next release by simply swapping the "events" and "events_for_migration" tables, then dropping the old events (now "events_for_migration") table. The new table structure is also optimised for storage space, and does not include the unused "title" column nor the "data" column (since this data is moved to "push_event_payloads"). == Newly Created Events Newly created events are inserted into both "events" and "events_for_migration", both using the exact same primary key value. The table "push_event_payloads" in turn has a foreign key to the _shadow_ table. This removes the need for recreating and validating the foreign key after swapping the tables. Since the shadow table also has a foreign key to "projects.id" we also don't have to worry about orphaned rows. This approach however does require some additional storage as we're duplicating a portion of the events data for at least 1 release. The exact amount is hard to estimate, but for GitLab.com this is expected to be between 10 and 20 GB at most. The background migration in this commit deliberately does _not_ update the "events" table as doing so would put a lot of pressure on PostgreSQL's auto vacuuming system. == Supporting Both Old And New Events Application code has also been adjusted to support push events using both the old and new data formats. This is done by creating a PushEvent class which extends the regular Event class. Using Rails' Single Table Inheritance system we can ensure the right class is used for the right data, which in this case is based on the value of `events.action`. To support displaying old and new data at the same time the PushEvent class re-defines a few methods of the Event class, falling back to their original implementations for push events in the old format. Once all existing events have been migrated the various push event related methods can be removed from the Event model, and the calls to `super` can be removed from the methods in the PushEvent model. The UI and event atom feed have also been slightly changed to better handle this new setup, fortunately only a few changes were necessary to make this work. == API Changes The API only displays push data of events in the new format. Supporting both formats in the API is a bit more difficult compared to the UI. Since the old push data was not really well documented (apart from one example that used an incorrect "action" nmae) I decided that supporting both was not worth the effort, especially since events will be migrated in a few days _and_ new events are created in the correct format.
2017-07-05Create and use project path helpers that only need a project, no namespaceDouwe Maan
2016-12-31HAMLLint: Fix `SpaceInsideHashAttributes` offencesKushal Pandya
2016-05-26Added author to various Markdown calls in viewsYorick Peterse
This ensures all these calls have an author set, allowing the use of "all" mentions where possible.
2015-09-04Basic support for an Atom-specific rendering pipelineRobert Speicher
2015-05-21Fix Atom feeds.Douwe Maan
2015-05-14Fix reference links in dashboard activity and ATOM feeds.Douwe Maan
2015-03-17Merge branch 'atom-xhtml-squashed' into 'master'Douwe Maan
Fix invalid Atom feeds when using emoji, horizontal rules, or images This is a fix for issues #880, #723, #1113. Markdown must be rendered to XHTML, not HTML, when generating summary content for Atom feeds. Otherwise, content-less tags like *img* and *hr* are not terminated and make the Atom XML invalid. Such tags are generated when issue descriptions, merge request descriptions, comments, or commit messages use emoji, horizontal rules, or images. To pass this option through from the relevant Haml templates to the proper place in the `gfm()` method, a new method `gfm_with_options()` is introduced. It reuses the options dictionary passed to `markdown()` and interprets options `xhtml` and `parse_tasks` from it (the latter was a convenient replacement for `gfm_with_tasks()`). `xhtml` is already interpreted by Redcarpet::Render::HTML, but that alone was not sufficient, because the post-processing in `gfm()` would convert its XHTML tags back to HTML. I found no way of passing additional optional options to the existing `gfm()` method without requiring updates to existing callers and without getting in the way of the existing optional arguments, but maybe someone who knows more about Ruby than I can think of one. Thorough review appreciated since this is the first time I have used Ruby. See merge request !344
2015-03-17Fix invalid Atom feeds when using emoji, horizontal rules, or images.Christian Walther
Fixes issues #880, #723, #1113: Markdown must be rendered to XHTML, not HTML, when generating summary content for Atom feeds. Otherwise, content-less tags like <img> and <hr>, generated when issue descriptions, merge request descriptions, comments, or commit messages use emoji, horizontal rules, or images, are not terminated and make the Atom XML invalid.
2015-02-14Upgrade to Rails 4.1.9Vinnie Okada
Make the following changes to deal with new behavior in Rails 4.1.2: * Use nested resources to avoid slashes in arguments to path helpers.
2014-10-10Use short_id instead of [0..N] for short version of commit shaDmitriy Zaporozhets
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-07-01Updated ATOM feed partials to use markdown instead of simple_format.Kyle Fazzari
2013-04-05Get rid of event decorator. Use event data hash instead commit objects to ↵Dmitriy Zaporozhets
increase perfomance
2012-10-04Escape html entities in commit messagesAlex Leutgöb
2012-09-24Add a more verbose dashboard event feedAlex Leutgöb
- Add project name to event title - Push: Entry links to single commit or commits overview depending on number of pushed commits - Push: Display first 15 commits with commit message and author and link to single commit - Issues: Display issue description