Making WordPress.org


Ignore:
Timestamp:
02/24/2020 06:28:21 AM (5 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/trac.wordpress.org/templates/ticket_change.html

    r9367 r9531  
    3333
    3434<py:choose>
    35 <py:when test="'author' in change and ('slackbot' == change.author or 'ircbot' == change.author or ( 'prbot' == change.author and change.comment.startswith('\'\'') ) )"
     35<py:when test="'author' in change and ('slackbot' == change.author or 'ircbot' == change.author)"
    3636         py:with="wporg_user = wporg_sanitize_user_nicename(change.author)"  >
    3737  <h3 class="change chat-bot">
     
    5353    </div>
    5454  </h3>
     55</py:when>
     56<py:when test="'author' in change and 'prbot' == change.author and change.comment.startswith('\'\'')"
     57         py:with="
     58           wporg_user  = wporg_sanitize_user_nicename(change.author);
     59           pr_byline   = change.comment.partition('\n')[0];
     60           pr_comment  = ''.join(change.comment.partition('\n')[1:]) or False;
     61           prbot_class = 'prbot with-context' if pr_comment else 'prbot without-context';
     62         ">
     63  <h3 class="change chat-bot ${prbot_class}">
     64    <span class="avatar">
     65      <span class="username-line">
     66        <img src="https://wordpress.org/grav-redirect.php?user=${wporg_user}&amp;s=48" srcset="https://wordpress.org/grav-redirect.php?user=${wporg_user}&amp;s=96 2x" height="48" width="48" />
     67        ${wiki_to_html(context, pr_byline, escape_newlines=preserve_newlines)}
     68      </span>
     69      <br /><span class="time-ago">${dateinfo(change.date)} ago</span>
     70    </span>
     71  </h3>
     72  <div py:if="pr_comment" class="comment searchable" xml:space="preserve">
     73    ${wiki_to_html(context, pr_comment, escape_newlines=preserve_newlines)}
     74  </div>
    5575</py:when>
    5676<py:otherwise>
Note: See TracChangeset for help on using the changeset viewer.