Back to Metrics

README

source/plugins/projects/README.md

3.345.0 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>๐Ÿ—‚๏ธ GitHub projects</h3></th></tr> <tr><td colspan="2" align="center"><p>This plugin displays progress of profile and repository projects.</p> </td></tr> <tr><th>โš ๏ธ Disclaimer</th><td><p>This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with <a href="https://github.com">GitHub</a>. All product and company names are trademarksโ„ข or registeredยฎ trademarks of their respective holders.</p> </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></td> </tr> <tr> <td><code>๐Ÿ‘ค Users</code> <code>๐Ÿ‘ฅ Organizations</code> <code>๐Ÿ““ Repositories</code></td> </tr> <tr> <td><code>๐Ÿ”‘ (scopeless)</code> <code>๐Ÿ”‘ public_repo</code> <code>๐Ÿ”‘ read:project</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" align="center"> </img>
</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>plugin_projects</code></h4></td> <td rowspan="2"><p>Enable projects plugin</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>plugin_projects_limit</code></h4></td> <td rowspan="2"><p>Display limit</p> <p>Projects defined by <a href="/source/plugins/projects/README.md#plugin_projects_repositories"><code>plugin_projects_repositories</code></a> are not affected by this option</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>number</code> <i>(0 โ‰ค ๐‘ฅ โ‰ค 100)</i>

<b>default:</b> 4

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_projects_repositories</code></h4></td> <td rowspan="2"><p>Featured repositories projects</p> <p>Use the following syntax for each project <code>:user/:repo/projects/:project_id</code></p> <blockquote> <p>โ„น๏ธ <a href="https://docs.github.com/en/issues/trying-out-the-new-projects-experience/about-projects">GitHub projects (beta)</a> needs to use the same syntax as above and repository must specified repository must be linked to given project.</p> </blockquote> </td> </tr> <tr> <td nowrap="nowrap">โฏ๏ธ Cannot be preset

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

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_projects_descriptions</code></h4></td> <td rowspan="2"><p>Projects descriptions</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>boolean</code>

<b>default:</b> no

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

๐Ÿ”„ Enabling progress tracking

By default, projects have progress tracking disabled.

To enable it, open the โ‰ก Menu from the project page and opt-in to Track project progress.

๐Ÿ‘ค Use personal projects

To create a personal project, select the Projects tab from your profile:

Fill informations and set visibility to public:

๐Ÿ““ Use repositories projects

Repositories projects are created from the Projects tab of a repository.

To use it with this plugin, retrieve the last section of the project URL (it should match the format :user/:repository/projects/:project_id) and add it in the plugin_projects_repositories.

Be sure to tick Track project progress in project settings to display a progress bar.

Example: include a project repository

yml
- uses: lowlighter/metrics@latest
  with:
    plugin_projects: yes
    plugin_projects_repositories: lowlighter/metrics/projects/1

โ„น๏ธ Examples workflows

<!--examples-->
yaml
name: Project from a repository
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.projects.svg
  token: ${{ secrets.METRICS_TOKEN_WITH_SCOPES }}
  base: ""
  plugin_projects: yes
  plugin_projects_repositories: lowlighter/metrics/projects/1
  plugin_projects_descriptions: yes

<!--/examples-->