Template:BugBotRule: Difference between revisions

Style the rule ID
(fix bugzilla url, remove old version of template)
(Style the rule ID)
 
(29 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
This is the "AutonagRule" template.
This is the "BugBotRule" template.
It should be called in the following format:
It should be called in the following format:
<pre>
<pre>
{{AutonagRule
{{BugBotRule
  | Rule ID  = 145
   | Rule name = Bug assigned but marked as <code>UNCONFIRMED</code>
   | Rule name = Bug assigned but marked as <code>UNCONFIRMED</code>
   | Purpose  = Mitigate an issue in Bugzilla (bugs reported by new users are not tagged as <code>NEW</code>)
   | Purpose  = Mitigate an issue in Bugzilla (bugs reported by new users are not tagged as <code>NEW</code>)
Line 9: Line 10:
   | Example  = 1495908
   | Example  = 1495908
   | Source    = assignee_but_unconfirmed.py  
   | Source    = assignee_but_unconfirmed.py  
  | Note      = optional parameter, adds an explanation line
  | Removed  = optional parameter, "yes" if the tool is removed from the source code
}}
}}
</pre>
</pre>
Edit the page to see the template text.
Edit the page to see the template text.
</noinclude><includeonly>
</noinclude><includeonly>
=== {{{ Rule name }}} ===
<h3 id="{{{ Source }}}" style="font-weight: unset; margin-bottom: 0; font-size: 130%; ">
<table style="text-indent: 0.5em; border-collapse: collapse; text-align: left; width: calc(100% - 20px); margin: 10px;">
{{#if:{{{Rule ID|}}}|
   <tr>
<span id="rule-{{{ Rule ID }}}" style="font-weight: lighter; ">Rule {{{ Rule ID }}}:</span>
     <th style="border: 1px solid lightskyblue; background-color: lightskyblue">Purpose</th>
}}
     <td style="border: 1px solid lightskyblue;">{{{ Purpose }}}</td>
{{{ Rule name }}}
</h3>
<table style="border-collapse: collapse; text-align: left; width: calc(100% - 20px); margin: 0 10px 0 0;">
   <tr style="vertical-align: top;">
     <th style="border: 1px solid lavender; background-color: skyblue; width: 8em; padding: 0 0.5em;">Purpose</th>
     <td style="border: 1px solid lavender; padding: 0 0.5em;">{{{ Purpose }}}</td>
  </tr>
{{#if:{{{Action|}}}|
  <tr style="vertical-align: top;">
    <th style="border: 1px solid lavender; background-color: greenyellow; padding: 0 0.5em;">Action</th>
    <td style="border: 1px solid lavender; padding: 0 0.5em;">{{{ Action }}}</td>
   </tr>
   </tr>
  <tr>
| <tr style="vertical-align: top;">
     <th style="border: 1px solid lightskyblue; background-color: greenyellow">Action</th>
     <th style="border: 1px solid lavender; background-color: greenyellow; padding: 0 0.5em;">Action</th>
     <td style="border: 1px solid lightskyblue;">{{{ Action }}}</td>
     <td style="border: 1px solid lavender; padding: 0 0.5em; color: #c33932; font-weight: bold;">No action yet</td>
   </tr>
   </tr>
   <tr>
}}
     <th style="border: 1px solid lightskyblue; background-color: aliceblue;">Example</th>
{{#if:{{{Example|}}}|
     <td style="border: 1px solid lightskyblue;">[https://bugzil.la/{{{Example}}} Bug {{{Example}}}]</td>
   <tr style="vertical-align: top;">
     <th style="border: 1px solid lavender; background-color: aliceblue; padding: 0 0.5em;">Example</th>
     <td style="border: 1px solid lavender; padding: 0 0.5em;">[https://bugzil.la/{{{Example}}} Bug {{{Example}}}]</td>
   </tr>
   </tr>
   <tr>
}}
     <th style="border: 1px solid lightskyblue;">Code</th>
{{#if:{{{Removed|}}}| |
     <td style="border: 1px solid lightskyblue;"><code>[https://github.com/mozilla/relman-auto-nag/blob/master/auto_nag/scripts/{{{ Source }}} {{{ Source }}}]</code></td>
   <tr style="vertical-align: top;">
     <th style="border: 1px solid lavender; padding: 0 0.5em;">Code</th>
     <td style="border: 1px solid lavender; padding: 0 0.5em;"><code>[https://github.com/mozilla/bugbot/blob/master/bugbot/rules/{{{ Source }}} {{{ Source }}}]</code></td>
   </tr>
   </tr>
}}
{{#if:{{{Note|}}}|
  <tr style="vertical-align: top;">
    <th style="border: 1px solid lavender; background-color: lightyellow; padding: 0 0.5em;">Note</th>
    <td style="border: 1px solid lavender; padding: 0 0.5em;">{{{ Note }}}</td>
  </tr>
}}
</table>
</table>
</includeonly>
</includeonly>