From ac2618d15765e979466549fc3262d0f188b42933 Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Sat, 15 Jan 2022 21:20:11 -0500 Subject: [PATCH] doc(plugins/projects): update --- source/plugins/projects/README.md | 110 +++++++++++++++------------ source/plugins/projects/metadata.yml | 28 +++---- 2 files changed, 77 insertions(+), 61 deletions(-) diff --git a/source/plugins/projects/README.md b/source/plugins/projects/README.md index 472eb409..0480468b 100644 --- a/source/plugins/projects/README.md +++ b/source/plugins/projects/README.md @@ -1,46 +1,28 @@ -### đŸ—‚ī¸ Active projects - -> âš ī¸ This plugin requires a personal token with public_repo scope. - -The *projects* plugin displays the progress of your profile projects. - + - + + + + + + + + + + + + + + +
- - -

đŸ—‚ī¸ Active projects

This plugin displays progress of your profile and repository projects.

+
Supported features
→ Full specification
📗 Classic template 📘 Repository template
👤 Users đŸ‘Ĩ Organizations 📓 Repositories
🔑 (scopeless) 🔑 public_repo read:org (optional) read:user (optional) repo (optional)
+ + +
+ -Because of GitHub REST API limitation, provided token requires `public_repo` scope to access projects informations. - -Note that by default, projects have progress tracking disabled. -To enable it, open the `≡ Menu` and edit the project to opt-in to `Track project progress` (it can be a bit confusing since it's actually not in the project settings). - -![Enable "Track project progress"](/.github/readme/imgs/plugin_projects_track_progress.png) - -
-đŸ’Ŧ Create a personal project on GitHub - -On your profile, select the `Projects` tab: -![Create a new project](/.github/readme/imgs/plugin_projects_create.png) - -Fill the informations and set visibility to *public*: -![Configure project](/.github/readme/imgs/plugin_projects_setup.png) - -
- -
-đŸ’Ŧ Use repositories projects - -It is possible to display projects related to repositories along with personal projects. - -To do so, open your repository project and retrieve the last URL endpoint, in the format `:user/:repository/projects/:project_id` (for example, `lowlighter/metrics/projects/1`) and add it in the `plugin_projects_repositories` option. Enable `Track project progress` in the project settings to display a progress bar in generated metrics. - -![Add a repository project](/.github/readme/imgs/plugin_projects_repositories.png) - -
- -#### âžĄī¸ Available options +## âžĄī¸ Available options @@ -49,7 +31,7 @@ To do so, open your repository project and retrieve the last URL endpoint, in th - @@ -59,7 +41,8 @@ To do so, open your repository project and retrieve the last URL endpoint, in th - @@ -72,7 +55,8 @@ To do so, open your repository project and retrieve the last URL endpoint, in th - @@ -82,7 +66,7 @@ To do so, open your repository project and retrieve the last URL endpoint, in th - @@ -93,9 +77,41 @@ To do so, open your repository project and retrieve the last URL endpoint, in th
plugin_projects

Display active projects

+

Enable projects plugin

plugin_projects_limit

Maximum number of projects to display

+

Display limit

+

Note that plugin_projects_repositories is not affected by this option

plugin_projects_repositories

List of repository project identifiers to disaplay

+

List of repositories projects

+

Use the following syntax for each project :user/:repo/projects/:project_id

plugin_projects_descriptions

Display projects descriptions

+

Toggle projects descriptions display

-*[→ Full specification](metadata.yml)* +## 🔄 Enabling progress tracking -#### â„šī¸ Examples workflows +By default, projects have progress tracking disabled. + +To enable it, open the `≡ Menu` from the project page and opt-in to `Track project progress`. + +![Enable "Track project progress"](/.github/readme/imgs/plugin_projects_track_progress.png) + +## 👤 Use personal projects + +To create a personal project, select the `Projects` tab from your profile: +![Create a new project](/.github/readme/imgs/plugin_projects_create.png) + +Fill informations and set visibility to *public*: +![Configure project](/.github/readme/imgs/plugin_projects_setup.png) + +## 📓 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. + +![Add a repository project](/.github/readme/imgs/plugin_projects_repositories.png) + +*Example: include a project repository* +```yml +- uses: lowlighter/metrics@latest + with: + plugin_projects: yes + plugin_projects_repositories: lowlighter/metrics/projects/1 +``` + +## â„šī¸ Examples workflows ```yaml @@ -110,4 +126,4 @@ with: plugin_projects_descriptions: 'yes' ``` - \ No newline at end of file + diff --git a/source/plugins/projects/metadata.yml b/source/plugins/projects/metadata.yml index a9ae7d54..6f7a87a6 100644 --- a/source/plugins/projects/metadata.yml +++ b/source/plugins/projects/metadata.yml @@ -1,5 +1,8 @@ name: "đŸ—‚ī¸ Active projects" category: github +description: This plugin displays progress of your profile and repository projects. +examples: + default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.projects.svg index: 11 supports: - user @@ -10,35 +13,32 @@ scopes: - public_repo inputs: - # Enable or disable plugin plugin_projects: - description: Display active projects + description: Enable projects plugin type: boolean default: no - # Number of projects to display - # Set to 0 to only display "plugin_projects_repositories" projects - # Projects listed in "plugin_projects_repositories" are not affected by this option plugin_projects_limit: - description: Maximum number of projects to display + description: | + Display limit + + Note that `plugin_projects_repositories` is not affected by this option type: number default: 4 min: 0 max: 100 - # List of repository projects to display, using the following format: - # :user/:repo/projects/:project_id plugin_projects_repositories: - description: List of repository project identifiers to disaplay + description: | + List of repositories projects + + Use the following syntax for each project `:user/:repo/projects/:project_id` type: array example: username/repo/projects/1, username/repo/projects/2, ... - format: - - comma-separated - - /(?[-a-z0-9]+)[/](?[-a-z0-9]+)[/]projects[/](?[0-9]+)/ + format: comma-separated default: "" - # Display projects descriptions plugin_projects_descriptions: - description: Display projects descriptions + description: Toggle projects descriptions display type: boolean default: no