Making WordPress.org


Ignore:
Timestamp:
02/26/2020 06:13:24 AM (5 years ago)
Author:
dd32
Message:

Trac: Github PRs: Filter out HTML comments and standard code-review-only boilerplate from PR descriptions before posting them to Trac.

Props isabel_brison for the suggestion.
Fixes #5057.

File:
1 edited

Legend:

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

    r9532 r9539  
    8080            $trac = get_trac_instance( $pr_data->trac_ticket[0] );
    8181
     82            $pr_description = format_pr_desc_for_trac_comment( $pr_data );
     83
    8284            $trac->update(
    8385                $pr_data->trac_ticket[1],
     
    8587                    "on [https://github.com/{$pr_repo}/ {$pr_repo}] " .
    8688                    "by [{$pr_data->user->url} {$pr_data->user->name}].''" .
    87                     ( trim( $pr_data->body ) ? "\n{$pr_data->body}" : '' ),
     89                    ( $pr_description ? "\n{$pr_description}" : '' ),
    8890                [],  // Attributes changed
    8991                true // Notify
Note: See TracChangeset for help on using the changeset viewer.