Skip to content

Commit ac2618d

Browse files
committed
doc(plugins/projects): update
1 parent 1b646ab commit ac2618d

File tree

2 files changed

+77
-61
lines changed

2 files changed

+77
-61
lines changed

source/plugins/projects/README.md

Lines changed: 63 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,28 @@
1-
### 🗂️ Active projects
2-
3-
> ⚠️ This plugin requires a personal token with public_repo scope.
4-
5-
The *projects* plugin displays the progress of your profile projects.
6-
1+
<!--header-->
72
<table>
8-
<td align="center">
9-
<img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.projects.svg">
10-
<img width="900" height="1" alt="">
11-
</td>
3+
<tr><th colspan="2"><h3>🗂️ Active projects</h3></th></tr>
4+
<tr><td colspan="2" align="center"><p>This plugin displays progress of your profile and repository projects.</p>
5+
</td></tr>
6+
<tr>
7+
<th rowspan="3">Supported features<br><sub><a href="metadata.yml">→ Full specification</a></sub></th>
8+
<td><a href="/source/templates/classic"><code>📗 Classic template</code></a> <a href="/source/templates/repository"><code>📘 Repository template</code></a></td>
9+
</tr>
10+
<tr>
11+
<td><code>👤 Users</code> <code>👥 Organizations</code> <code>📓 Repositories</code></td>
12+
</tr>
13+
<tr>
14+
<td><code>🔑 (scopeless)</code> <code>🔑 public_repo</code> <code>read:org (optional)</code> <code>read:user (optional)</code> <code>repo (optional)</code></td>
15+
</tr>
16+
<tr>
17+
<td colspan="2" align="center">
18+
<img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.projects.svg" alt=""></img>
19+
<img width="900" height="1" alt="">
20+
</td>
21+
</tr>
1222
</table>
23+
<!--/header-->
1324

14-
Because of GitHub REST API limitation, provided token requires `public_repo` scope to access projects informations.
15-
16-
Note that by default, projects have progress tracking disabled.
17-
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).
18-
19-
![Enable "Track project progress"](/.github/readme/imgs/plugin_projects_track_progress.png)
20-
21-
<details>
22-
<summary>💬 Create a personal project on GitHub</summary>
23-
24-
On your profile, select the `Projects` tab:
25-
![Create a new project](/.github/readme/imgs/plugin_projects_create.png)
26-
27-
Fill the informations and set visibility to *public*:
28-
![Configure project](/.github/readme/imgs/plugin_projects_setup.png)
29-
30-
</details>
31-
32-
<details>
33-
<summary>💬 Use repositories projects</summary>
34-
35-
It is possible to display projects related to repositories along with personal projects.
36-
37-
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.
38-
39-
![Add a repository project](/.github/readme/imgs/plugin_projects_repositories.png)
40-
41-
</details>
42-
43-
#### ➡️ Available options
25+
## ➡️ Available options
4426

4527
<!--options-->
4628
<table>
@@ -49,7 +31,7 @@ To do so, open your repository project and retrieve the last URL endpoint, in th
4931
</tr>
5032
<tr>
5133
<td nowrap="nowrap"><code>plugin_projects</code></td>
52-
<td rowspan="2"><p>Display active projects</p>
34+
<td rowspan="2"><p>Enable projects plugin</p>
5335
<img width="900" height="1" alt=""></td>
5436
</tr>
5537
<tr>
@@ -59,7 +41,8 @@ To do so, open your repository project and retrieve the last URL endpoint, in th
5941
</tr>
6042
<tr>
6143
<td nowrap="nowrap"><code>plugin_projects_limit</code></td>
62-
<td rowspan="2"><p>Maximum number of projects to display</p>
44+
<td rowspan="2"><p>Display limit</p>
45+
<p>Note that <code>plugin_projects_repositories</code> is not affected by this option</p>
6346
<img width="900" height="1" alt=""></td>
6447
</tr>
6548
<tr>
@@ -72,7 +55,8 @@ To do so, open your repository project and retrieve the last URL endpoint, in th
7255
</tr>
7356
<tr>
7457
<td nowrap="nowrap"><code>plugin_projects_repositories</code></td>
75-
<td rowspan="2"><p>List of repository project identifiers to disaplay</p>
58+
<td rowspan="2"><p>List of repositories projects</p>
59+
<p>Use the following syntax for each project <code>:user/:repo/projects/:project_id</code></p>
7660
<img width="900" height="1" alt=""></td>
7761
</tr>
7862
<tr>
@@ -82,7 +66,7 @@ To do so, open your repository project and retrieve the last URL endpoint, in th
8266
</tr>
8367
<tr>
8468
<td nowrap="nowrap"><code>plugin_projects_descriptions</code></td>
85-
<td rowspan="2"><p>Display projects descriptions</p>
69+
<td rowspan="2"><p>Toggle projects descriptions display</p>
8670
<img width="900" height="1" alt=""></td>
8771
</tr>
8872
<tr>
@@ -93,9 +77,41 @@ To do so, open your repository project and retrieve the last URL endpoint, in th
9377
</table>
9478
<!--/options-->
9579

96-
*[→ Full specification](metadata.yml)*
80+
## 🔄 Enabling progress tracking
81+
82+
By default, projects have progress tracking disabled.
83+
84+
To enable it, open the `≡ Menu` from the project page and opt-in to `Track project progress`.
85+
86+
![Enable "Track project progress"](/.github/readme/imgs/plugin_projects_track_progress.png)
87+
88+
## 👤 Use personal projects
89+
90+
To create a personal project, select the `Projects` tab from your profile:
91+
![Create a new project](/.github/readme/imgs/plugin_projects_create.png)
92+
93+
Fill informations and set visibility to *public*:
94+
![Configure project](/.github/readme/imgs/plugin_projects_setup.png)
95+
96+
## 📓 Use repositories projects
97+
98+
Repositories projects are created from the `Projects` tab of a repository.
99+
100+
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`.
101+
102+
Be sure to tick `Track project progress` in project settings to display a progress bar.
103+
104+
![Add a repository project](/.github/readme/imgs/plugin_projects_repositories.png)
105+
106+
*Example: include a project repository*
107+
```yml
108+
- uses: lowlighter/metrics@latest
109+
with:
110+
plugin_projects: yes
111+
plugin_projects_repositories: lowlighter/metrics/projects/1
112+
```
97113
98-
#### ℹ️ Examples workflows
114+
## ℹ️ Examples workflows
99115
100116
<!--examples-->
101117
```yaml
@@ -110,4 +126,4 @@ with:
110126
plugin_projects_descriptions: 'yes'
111127

112128
```
113-
<!--/examples-->
129+
<!--/examples-->
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: "🗂️ Active projects"
22
category: github
3+
description: This plugin displays progress of your profile and repository projects.
4+
examples:
5+
default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.projects.svg
36
index: 11
47
supports:
58
- user
@@ -10,35 +13,32 @@ scopes:
1013
- public_repo
1114
inputs:
1215

13-
# Enable or disable plugin
1416
plugin_projects:
15-
description: Display active projects
17+
description: Enable projects plugin
1618
type: boolean
1719
default: no
1820

19-
# Number of projects to display
20-
# Set to 0 to only display "plugin_projects_repositories" projects
21-
# Projects listed in "plugin_projects_repositories" are not affected by this option
2221
plugin_projects_limit:
23-
description: Maximum number of projects to display
22+
description: |
23+
Display limit
24+
25+
Note that `plugin_projects_repositories` is not affected by this option
2426
type: number
2527
default: 4
2628
min: 0
2729
max: 100
2830

29-
# List of repository projects to display, using the following format:
30-
# :user/:repo/projects/:project_id
3131
plugin_projects_repositories:
32-
description: List of repository project identifiers to disaplay
32+
description: |
33+
List of repositories projects
34+
35+
Use the following syntax for each project `:user/:repo/projects/:project_id`
3336
type: array
3437
example: username/repo/projects/1, username/repo/projects/2, ...
35-
format:
36-
- comma-separated
37-
- /(?<user>[-a-z0-9]+)[/](?<repo>[-a-z0-9]+)[/]projects[/](?<id>[0-9]+)/
38+
format: comma-separated
3839
default: ""
3940

40-
# Display projects descriptions
4141
plugin_projects_descriptions:
42-
description: Display projects descriptions
42+
description: Toggle projects descriptions display
4343
type: boolean
4444
default: no

0 commit comments

Comments
 (0)