Back to Metrics

README

source/plugins/base/README.md

3.347.6 KB
Original Source
<!--header--> <table> <tr><td colspan="2"><a href="/README.md#-plugins">← Back to plugins index</a></td></tr> <tr><th colspan="2"><h3>šŸ—ƒļø Base content</h3></th></tr> <tr><td colspan="2" align="center"></td></tr> <tr> <th rowspan="3">Supported features <sub><a href="metadata.yml">→ Full specification</a></sub></th> <td><a href="/source/templates/classic/README.md"><code>šŸ“— Classic template</code></a> <a href="/source/templates/repository/README.md"><code>šŸ“˜ Repository template</code></a> <a href="/source/templates/terminal/README.md"><code>šŸ“™ Terminal template</code></a></td> </tr> <tr> <td><code>šŸ‘¤ Users</code> <code>šŸ‘„ Organizations</code> <code>šŸ““ Repositories</code></td> </tr> <tr> <td><code>šŸ”‘ (scopeless)</code> <code>read:org (optional)</code> <code>read:user (optional)</code> <code>read:packages (optional)</code> <code>repo (optional)</code></td> </tr> <tr> <td colspan="2"><table><tr> <td align="center"> </img> </td> <td align="center"> </img> </td> </tr></table></td> </tr> </table> <!--/header-->

āž”ļø Available options

<!--options--> <table> <tr> <td align="center" nowrap="nowrap">Option</i></td><td align="center" nowrap="nowrap">Description</td> </tr> <tr> <td nowrap="nowrap"><h4><code>base</code></h4></td> <td rowspan="2"><p>Base content</p> <p>The following sections are supported:</p> <ul> <li><code>header</code>, which usually contains username, two-weeks commits calendars and a few additional data</li> <li><code>activity</code>, which contains recent activity (commits, pull requests, issues, etc.)</li> <li><code>community</code>, which contains community stats (following, sponsors, organizations, etc.)</li> <li><code>repositories</code>, which contains repository stats (license, forks, stars, etc.)</li> <li><code>metadata</code>, which contains information about generated metrics</li> </ul> <p>These are all enabled by default, but it is possible to explicitly opt out from them.</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>array</code> <i>(comma-separated)</i>

<b>default:</b> header, activity, community, repositories, metadata

<b>allowed values:</b><ul><li>header</li><li>activity</li><li>community</li><li>repositories</li><li>metadata</li></ul></td>

</tr> <tr> <td nowrap="nowrap"><h4><code>base_indepth</code></h4></td> <td rowspan="2"><p>Indepth mode</p> <p>Enabling this will consume additional API queries to fetch more data. This currently improves the accuracy of the following statistics:</p> <ul> <li>total commits</li> <li>total issues</li> <li>total pull requests</li> <li>total pull requests reviews</li> <li>total repositories contributed to</li> </ul> </td> </tr> <tr> <td nowrap="nowrap">🌐 Web instances must configure <code>settings.json</code>: <ul> <li><i>metrics.api.github.overuse</i></li> </ul> <b>type:</b> <code>boolean</code>

<b>default:</b> no

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>base_hireable</code></h4></td> <td rowspan="2"><p>Show <code>Available for hire!</code> in header section</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>boolean</code>

<b>default:</b> no

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>base_skip</code></h4></td> <td rowspan="2"><p>Skip base content</p> <blockquote> <p>āš ļø Any plugin that relies on base content data may break! Only use this option when using a plugin that can be configured with <a href="/source/plugins/core/README.md#token"><code>token: NOT_NEEDED</code></a></p> </blockquote> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>boolean</code>

<b>default:</b> no

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>repositories</code></h4></td> <td rowspan="2"><p>Fetched repositories</p> <p>A higher value result in more accurate metrics but can hit GitHub API rate-limit more easily (especially with a lot of plugins enabled)</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>number</code> <i>(0 ≤ š‘„)</i>

<b>default:</b> 100

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>repositories_batch</code></h4></td> <td rowspan="2"><p>Fetched repositories per query</p> <p>If you receive <code>Something went wrong while executing your query</code> (which is usually caused by API timeouts), lowering this value may help. This setting may not be supported by all plugins.</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>number</code> <i>(1 ≤ š‘„ ≤ 100)</i>

<b>default:</b> 100

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>repositories_forks</code></h4></td> <td rowspan="2"><p>Include forks</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>boolean</code>

<b>default:</b> no

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>repositories_affiliations</code></h4></td> <td rowspan="2"><p>Repositories affiliations</p> <ul> <li><code>owner</code>: owned repositories</li> <li><code>collaborator</code>: repositories with push access</li> <li><code>organization_member</code>: repositories from an organization where user is a member</li> </ul> <p>Some plugin outputs may be affected by this setting too.</p> <p>Set to <code>&quot;&quot;</code> to disable and fetch all repositories related to given account. Broad affiliations will result in less representative metrics.</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>array</code> <i>(comma-separated)</i>

<b>default:</b> owner

<b>allowed values:</b><ul><li>owner</li><li>collaborator</li><li>organization_member</li></ul></td>

</tr> <tr> <td nowrap="nowrap"><h4><code>repositories_skipped</code></h4></td> <td rowspan="2"><p>Default skipped repositories</p> </td> </tr> <tr> <td nowrap="nowrap">ā­ļø Global option

<b>type:</b> <code>array</code> <i>(newline-separated)</i>

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>users_ignored</code></h4></td> <td rowspan="2"><p>Default ignored users</p> <p>Note that emails are only supported in commits-related elements.</p> </td> </tr> <tr> <td nowrap="nowrap">ā­ļø Global option

<b>type:</b> <code>array</code> <i>(comma-separated)</i>

<b>default:</b> github-actions[bot], dependabot[bot], dependabot-preview[bot], actions-user, [email protected]

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>commits_authoring</code></h4></td> <td rowspan="2"><p>Identifiers that has been used for authoring commits</p> <p>Specify names, surnames, username, email addresses that has been used in the past that can be used to detect commits ownerships in some plugins</p> </td> </tr> <tr> <td nowrap="nowrap">ā­ļø Global option

āÆļø Cannot be preset

<b>type:</b> <code>array</code> <i>(comma-separated)</i>

<b>default:</b> <code>→ User login</code>

</td> </tr> </table> <!--/options-->

ā„¹ļø Examples workflows

<!--examples-->
yaml
name: Default metrics
uses: lowlighter/metrics@latest
with:
  filename: metrics.base.svg
  token: ${{ secrets.METRICS_TOKEN }}
  base: header, activity, community, repositories, metadata

<!--/examples-->