WordPress.org

Making WordPress.org

Ticket #4221: #4221.diff

File #4221.diff, 811 bytes (added by kailanitish90, 3 years ago)
  • slack-trac-hook.php

     
    8585        send_mentions_payload( $payload );
    8686}
    8787
     88/**
     89 * @param $payload
     90 * @return false|string
     91 */
    8892function send_mentions_payload( $payload ) {
    8993        $payload = json_encode( $payload );
    9094        $secret  = MENTIONS_API_KEY;
     
    101105        return file_get_contents( MENTIONS_API_HANDLER, false, $context );
    102106}
    103107
     108/**
     109 * @param $payload
     110 */
    104111function maybe_add_ticket_cc_to_payload( &$payload ) {
    105112        if ( $payload['trac'] === 'security' && file_exists( __DIR__ . '/security-trac-cc.sh' ) ) {
    106113                $cc = trim( shell_exec( escapeshellcmd( __DIR__ . '/security-trac-cc.sh ' . escapeshellarg( (int) $payload['ticket_id'] ) ) ) );