Making WordPress.org


Ignore:
Timestamp:
02/24/2020 06:28:21 AM (6 years ago)
Author:
dd32
Message:

Trac: Github PRs: Include the PR bodytext in the Trac notification.

This should help include some more context in the PRs and also make it easier to keep all pertitant information in one place (Trac).

See #5054.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/dotorg/trac/pr/webhook.php

    r9373 r9531  
    5858        }
    5959
     60        // Remove the specific Trac Ticket and PR Body from the DB version.
    6061        $_pr_data_no_ticket = clone $pr_data;
    61         unset( $_pr_data_no_ticket->trac_ticket );
     62        unset( $_pr_data_no_ticket->trac_ticket, $_pr_data_no_ticket->body );
    6263
    6364        // Step 3. If not in DB, or $pr_data->trac_ticket isn't yet in the DB, add a new row of it.
     
    8384                "''This ticket was mentioned in [{$pr_data->html_url} PR #{$pr_number}] " .
    8485                    "on [https://github.com/{$pr_repo}/ {$pr_repo}] " .
    85                     "by [{$pr_data->user->url} {$pr_data->user->name}].''"
     86                    "by [{$pr_data->user->url} {$pr_data->user->name}].''" .
     87                    ( trim( $pr_data->body ) ? "\n{$pr_data->body}" : '' )
    8688            );
    8789        }
Note: See TracChangeset for help on using the changeset viewer.