Making WordPress.org


Ignore:
Timestamp:
12/31/2014 04:48:29 PM (10 years ago)
Author:
nacin
Message:

Slack: Add hooks for processing tickets/comments from Trac.

Location:
sites/trunk/svn.wordpress.org/includes/slack-trac-hooks
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • sites/trunk/svn.wordpress.org/includes/slack-trac-hooks/config.php

    r1075 r1078  
    11<?php
    22
    3 namespace SlackCommitHook;
     3namespace Dotorg\SlackTracHooks;
    44
    55class Core_Trac extends Trac {
    6     protected $channels = array( '#core', '#core-commits' );
    7     protected $username = 'WordPress commit';
     6    protected $commit_channels = array( '#core', '#core-commits' );
     7    protected $commit_username = 'WordPress commit';
     8    protected $commit_range = array( 3, 5 );
    89    protected $ticket_range = array( 3, 5 );
    9     protected $commit_range = array( 3, 5 );
     10
     11    protected $ticket_channels  = array( '#core', '#core-newtickets' );
     12    protected $ticket_username  = 'WordPress Trac';
     13    protected $firehose_channel = '#core-firehose';
    1014
    1115    /**
     
    1317     * Start regex matches with # as your delimiter.
    1418     */
    15     protected $channel_matcher = array(
     19    protected $commit_path_filters = array(
    1620        'wp-content/themes'       => '#core-themes',
    1721        'customize'               => '#core-customize',
     
    2125        'press-this.php'          => '#feature-pressthis',
    2226    );
     27
     28    /**
     29     * Components or focuses that cause new tickets to be piped to particular channels.
     30     */
     31    protected $ticket_component_filters = array(
     32        'Customize'     => '#core-customize',
     33        'Bundled Theme' => '#core-themes',
     34        'Press This'    => '#feature-pressthis',
     35    );
    2336}
    2437
    2538class Meta_Trac extends Trac {
    26     protected $channels = array( '#meta', '#meta-commits' );
    27     protected $username = 'WordPress.org Meta commit';
     39    protected $commit_channels = array( '#meta', '#meta-commits' );
     40    protected $commit_username = 'WordPress.org Meta commit';
    2841
    29     protected $channel_matcher = array(
     42    protected $ticket_channels = array( '#meta-newtickets' );
     43
     44    protected $commit_path_filters = array(
    3045        'translate.wordpress.org/' => '#meta-i18n',
    3146        'global.wordpress.org/'    => '#meta-i18n',
     
    3449        'wporg-developer/'         => '#meta-devhub',
    3550    );
     51
     52    protected $ticket_component_filters = array(
     53        'International Forums'          => '#meta-i18n',
     54        'International Sites (Rosetta)' => '#meta-i18n',
     55        'translate.wordpress.org'       => '#meta-i18n',
     56        'developer.wordpress.org'       => '#meta-devhub',
     57    );
    3658}
    3759
    3860class bbPress_Trac extends Trac {
    39     protected $channels = array( '#bbpress', '#bbpress-commits' );
    40     protected $username = 'bbPress commit';
     61    protected $commit_channels = array( '#bbpress', '#bbpress-commits' );
     62    protected $commit_username = 'bbPress commit';
     63    protected $ticket_channels = array( '#bbpress', '#bbpress-newtickets' );
    4164    protected $color    = '#080';
    4265    protected $emoji    = ':bbpress:';
     
    4467
    4568class BuddyPress_Trac extends Trac {
    46     protected $channels = array( '#buddypress', '#buddypress-commits' );
    47     protected $username = 'BuddyPress commit';
     69    protected $commit_channels = array( '#buddypress', '#buddypress-commits' );
     70    protected $commit_username = 'BuddyPress commit';
     71    protected $ticket_channels = array( '#buddypress', '#buddypress-newtickets' );
    4872    protected $color    = '#d84800';
    4973    protected $emoji    = ':buddypress:';
     
    5175
    5276class Dotorg_Trac extends Trac {
    53     protected $channels = 'dotorg';
    54     protected $username = 'Private dotorg commit';
     77    protected $commit_channels = 'dotorg';
     78    protected $commit_username = 'Private dotorg commit';
     79    protected $ticket_channels = 'dotorg';
    5580}
    5681
    5782class Deploy_Trac extends Trac {
    58     protected $channels = 'dotorg';
    59     protected $username = 'Deploy commit';
     83    protected $commit_channels = 'dotorg';
     84    protected $commit_username = 'Deploy commit';
     85    protected $ticket_channels = 'dotorg';
    6086}
    6187
    6288class GlotPress_Trac extends Trac {
    63     protected $channels = '#glotpress';
    64     protected $username = 'GlotPress commit';
     89    protected $commit_channels = '#glotpress';
     90    protected $commit_username = 'GlotPress commit';
     91    protected $ticket_channels = '#glotpress';
    6592}
Note: See TracChangeset for help on using the changeset viewer.