• Alex Kalderimis's avatar
    Create wiki events on pushes · ab97b007
    Alex Kalderimis authored
    On every push received by the post-receive hook, the WikiPushService is
    run on the changes. This modifies that file to look at the changes in
    the master branch (well, wiki repo default branch) and create any wiki
    events necessary.
    
    These actions are guarded by two feature flags:
    
     - :wiki_events
        This prevents wiki pushes creating events while the wiki_events flag is
        off. This flag is the same flag used by the WikiPage services.
     - :wiki_events_on_git_push, (scoped to project)
        Specific feature flag for git-access
    
    - WikiPushService::Change
    
    Most of the state is in the change class, combining the change with the
    raw diff change, and this extraction tidies
    things up a lot.
    
    Logic repeated between EE and core is refactored to be consistent.
    
    - Add WikiPages::EventCreateService
    
    This service wraps EventCreateService and manages the instantiation of
    WikiPage::Meta objects. A spec is added to verify this.
    
    This verifies the three public methods for this class
    - last_known_slug
    - page
    - event_action
    
    The number of changes we will process is subject to a safety limit.
    ab97b007
30526-c-be-wiki-activity-Pushes.yml 113 Bytes