Skip to content

Commit ae8a76d

Browse files
committedJan 16, 2022
doc(plugins/activity): update
1 parent 6c1ce01 commit ae8a76d

File tree

2 files changed

+118
-95
lines changed

2 files changed

+118
-95
lines changed
 

‎source/plugins/activity/README.md

+62-52
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,28 @@
1-
### 📰 Recent activity
2-
3-
The *activity* plugin displays your recent activity on GitHub.
4-
1+
<!--header-->
52
<table>
6-
<td align="center">
7-
<img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.activity.svg">
8-
<img width="900" height="1" alt="">
9-
</td>
3+
<tr><th colspan="2"><h3>📰 Recent activity</h3></th></tr>
4+
<tr><td colspan="2" align="center"><p>This plugin displays your recent activity on GitHub.</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/markdown"><code>📒 Markdown 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>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.activity.svg" alt=""></img>
19+
<img width="900" height="1" alt="">
20+
</td>
21+
</tr>
1022
</table>
23+
<!--/header-->
1124

12-
It uses data from [GitHub events](https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events/github-event-types) and is able to track the following events:
13-
14-
| Event | Description |
15-
| ------------ | ----------------------------------------------- |
16-
| `push` | Push of commits |
17-
| `issue` | Opening/Reopening/Closing of issues |
18-
| `pr` | Opening/Closing of pull requests |
19-
| `ref/create` | Creation of git tags or git branches |
20-
| `ref/delete` | Deletion of git tags or git branches |
21-
| `release` | Publication of new releases |
22-
| `review` | Review of pull requests |
23-
| `comment` | Comments on commits, issues and pull requests |
24-
| `wiki` | Edition of wiki pages |
25-
| `fork` | Forking of repositories |
26-
| `star` | Starring of repositories |
27-
| `public` | Repositories made public |
28-
| `member` | Addition of new collaborator in repository |
29-
30-
Use a full `repo` scope token to display **private** events.
31-
32-
#### ➡️ Available options
25+
## ➡️ Available options
3326

3427
<!--options-->
3528
<table>
@@ -38,7 +31,7 @@ Use a full `repo` scope token to display **private** events.
3831
</tr>
3932
<tr>
4033
<td nowrap="nowrap"><code>plugin_activity</code></td>
41-
<td rowspan="2"><p>Display recent activity</p>
34+
<td rowspan="2"><p>Enable activity plugin</p>
4235
<img width="900" height="1" alt=""></td>
4336
</tr>
4437
<tr>
@@ -48,7 +41,7 @@ Use a full `repo` scope token to display **private** events.
4841
</tr>
4942
<tr>
5043
<td nowrap="nowrap"><code>plugin_activity_limit</code></td>
51-
<td rowspan="2"><p>Maximum number of events to display</p>
44+
<td rowspan="2"><p>Display limit</p>
5245
<img width="900" height="1" alt=""></td>
5346
</tr>
5447
<tr>
@@ -61,7 +54,7 @@ Use a full `repo` scope token to display **private** events.
6154
</tr>
6255
<tr>
6356
<td nowrap="nowrap"><code>plugin_activity_load</code></td>
64-
<td rowspan="2"><p>Number of events to load</p>
57+
<td rowspan="2"><p>Events to load</p>
6558
<img width="900" height="1" alt=""></td>
6659
</tr>
6760
<tr>
@@ -74,7 +67,7 @@ Use a full `repo` scope token to display **private** events.
7467
</tr>
7568
<tr>
7669
<td nowrap="nowrap"><code>plugin_activity_days</code></td>
77-
<td rowspan="2"><p>Maximum event age</p>
70+
<td rowspan="2"><p>Events maximum age</p>
7871
<img width="900" height="1" alt=""></td>
7972
</tr>
8073
<tr>
@@ -83,23 +76,13 @@ Use a full `repo` scope token to display **private** events.
8376
𝑥
8477
≤ 365)</i>
8578
<br>
79+
<b>zero behaviour:</b> disable</br>
8680
<b>default:</b> 14<br></td>
87-
</tr>
88-
<tr>
89-
<td nowrap="nowrap"><code>plugin_activity_filter</code></td>
90-
<td rowspan="2"><p>Events types to keep</p>
91-
<img width="900" height="1" alt=""></td>
92-
</tr>
93-
<tr>
94-
<td nowrap="nowrap"><b>type:</b> <code>array</code>
95-
<i>(comma-separated)</i>
96-
<br>
97-
<b>default:</b> all<br>
98-
<b>allowed values:</b><ul><li>all</li><li>comment</li><li>ref/create</li><li>ref/delete</li><li>release</li><li>push</li><li>issue</li><li>pr</li><li>review</li><li>wiki</li><li>fork</li><li>star</li><li>member</li><li>public</li></ul></td>
9981
</tr>
10082
<tr>
10183
<td nowrap="nowrap"><code>plugin_activity_visibility</code></td>
102-
<td rowspan="2"><p>Set events visibility</p>
84+
<td rowspan="2"><p>Events visibility</p>
85+
<p>Lets you hide private activity when using a <code>repo</code> scope token</p>
10386
<img width="900" height="1" alt=""></td>
10487
</tr>
10588
<tr>
@@ -120,7 +103,7 @@ Use a full `repo` scope token to display **private** events.
120103
</tr>
121104
<tr>
122105
<td nowrap="nowrap"><code>plugin_activity_skipped</code></td>
123-
<td rowspan="2"><p>Repositories to skip</p>
106+
<td rowspan="2"><p>Skipped repositories</p>
124107
<img width="900" height="1" alt=""></td>
125108
</tr>
126109
<tr>
@@ -131,20 +114,47 @@ Use a full `repo` scope token to display **private** events.
131114
</tr>
132115
<tr>
133116
<td nowrap="nowrap"><code>plugin_activity_ignored</code></td>
134-
<td rowspan="2"><p>Actors to ignore</p>
117+
<td rowspan="2"><p>Ignored users</p>
118+
<p>Useful to ignore bots activity</p>
135119
<img width="900" height="1" alt=""></td>
136120
</tr>
137121
<tr>
138122
<td nowrap="nowrap">⏩ Inherits <code>users_ignored</code><br>
139123
<b>type:</b> <code>undefined</code>
140124
<br></td>
141125
</tr>
126+
<tr>
127+
<td nowrap="nowrap"><code>plugin_activity_filter</code></td>
128+
<td rowspan="2"><p>Events types</p>
129+
<p>These are fetched from <a href="https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events/github-event-types">GitHub events API</a> and the following types are currently supported:</p>
130+
<ul>
131+
<li><code>push</code>: Push of commits</li>
132+
<li><code>issue</code>: Opening/Reopening/Closing of issues</li>
133+
<li><code>pr</code>: Opening/Closing of pull requests</li>
134+
<li>`ref/create: Creation of git tags or git branches</li>
135+
<li>`ref/delete: Deletion of git tags or git branches</li>
136+
<li><code>release</code>: Publication of new releases</li>
137+
<li><code>review</code>: Review of pull requests</li>
138+
<li><code>comment</code>: Comments on commits, issues and pull requests</li>
139+
<li><code>wiki</code>: Edition of wiki pages</li>
140+
<li><code>fork</code>: Forking of repositories</li>
141+
<li><code>star</code>: Starring of repositories</li>
142+
<li><code>public</code>: Repositories made public</li>
143+
<li><code>member</code>: Addition of new collaborator in repository</li>
144+
</ul>
145+
<img width="900" height="1" alt=""></td>
146+
</tr>
147+
<tr>
148+
<td nowrap="nowrap"><b>type:</b> <code>array</code>
149+
<i>(comma-separated)</i>
150+
<br>
151+
<b>default:</b> all<br>
152+
<b>allowed values:</b><ul><li>all</li><li>comment</li><li>ref/create</li><li>ref/delete</li><li>release</li><li>push</li><li>issue</li><li>pr</li><li>review</li><li>wiki</li><li>fork</li><li>star</li><li>member</li><li>public</li></ul></td>
153+
</tr>
142154
</table>
143155
<!--/options-->
144156

145-
*[→ Full specification](metadata.yml)*
146-
147-
#### ℹ️ Examples workflows
157+
## ℹ️ Examples workflows
148158

149159
<!--examples-->
150160
```yaml
@@ -160,4 +170,4 @@ with:
160170
plugin_activity_filter: issue, pr, release, fork, review, ref/create
161171

162172
```
163-
<!--/examples-->
173+
<!--/examples-->

‎source/plugins/activity/metadata.yml

+56-43
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: "📰 Recent activity"
22
category: github
3+
description: This plugin displays your recent activity on GitHub.
4+
examples:
5+
default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.activity.svg
36
index: 13
47
supports:
58
- user
@@ -9,89 +12,99 @@ scopes:
912
- public_access
1013
inputs:
1114

12-
# Enable or disable plugin
1315
plugin_activity:
14-
description: Display recent activity
16+
description: Enable activity plugin
1517
type: boolean
1618
default: no
1719

18-
# Number of activity events to display
1920
plugin_activity_limit:
20-
description: Maximum number of events to display
21+
description: Display limit
2122
type: number
2223
default: 5
2324
min: 1
2425
max: 1000
2526

26-
# Number of activity events to load
27-
# This should be higher than "plugin_activity_limit"
28-
# A high number will consume more requests
2927
plugin_activity_load:
30-
description: Number of events to load
28+
description: Events to load
3129
type: number
3230
default: 300
3331
min: 100
3432
max: 1000
3533

36-
# Filter events by age
37-
# Note that it only filter fetched events, you may need to increase "plugin_activity_limit" to display older events
38-
# Set to 0 to disable age filtering
3934
plugin_activity_days:
40-
description: Maximum event age
35+
description: Events maximum age
4136
type: number
4237
default: 14
4338
min: 0
4439
max: 365
40+
zero: disable
4541

46-
# Filter events by type
47-
plugin_activity_filter:
48-
description: Events types to keep
49-
type: array
50-
format: comma-separated
51-
default: all
52-
example: issue, pr, review, wiki, star
53-
values:
54-
- all # Display all types of events
55-
- comment # Display commits, issues and pull requests comments
56-
- ref/create # Display tags and branches creations
57-
- ref/delete # Display tags and branches deletions
58-
- release # Display published releases
59-
- push # Display commits
60-
- issue # Display issues events
61-
- pr # Display pull requests events
62-
- review # Display pull request reviews
63-
- wiki # Display wiki editions
64-
- fork # Display forked repositories
65-
- star # Display starred repositories
66-
- member # Display collaborators additions
67-
- public # Display repositories made public
68-
69-
# Set events visibility (use this to restrict events when using a "repo" token)
7042
plugin_activity_visibility:
71-
description: Set events visibility
43+
description: |
44+
Events visibility
45+
46+
Lets you hide private activity when using a `repo` scope token
7247
type: string
7348
default: all
7449
values:
7550
- public
7651
- all
7752

78-
# Display events timestamps
7953
plugin_activity_timestamps:
8054
description: Display events timestamps
8155
type: boolean
8256
default: no
8357

84-
# List of repositories that will be skipped
8558
plugin_activity_skipped:
86-
description: Repositories to skip
59+
description: Skipped repositories
8760
type: array
8861
format: comma-separated
8962
default: ""
9063
example: my-repo-1, my-repo-2, owner/repo-3, ...
9164
inherits: repositories_skipped
9265

93-
# Ignored actors (useful to ignore bots users)
9466
plugin_activity_ignored:
95-
description: Actors to ignore
67+
description: |
68+
Ignored users
69+
70+
Useful to ignore bots activity
9671
default: ""
97-
inherits: users_ignored
72+
inherits: users_ignored
73+
74+
plugin_activity_filter:
75+
description: |
76+
Events types
77+
78+
These are fetched from [GitHub events API](https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events/github-event-types) and the following types are currently supported:
79+
- `push`: Push of commits
80+
- `issue`: Opening/Reopening/Closing of issues
81+
- `pr`: Opening/Closing of pull requests
82+
- `ref/create: Creation of git tags or git branches
83+
- `ref/delete: Deletion of git tags or git branches
84+
- `release`: Publication of new releases
85+
- `review`: Review of pull requests
86+
- `comment`: Comments on commits, issues and pull requests
87+
- `wiki`: Edition of wiki pages
88+
- `fork`: Forking of repositories
89+
- `star`: Starring of repositories
90+
- `public`: Repositories made public
91+
- `member`: Addition of new collaborator in repository
92+
type: array
93+
format: comma-separated
94+
default: all
95+
example: issue, pr, review, wiki, star
96+
values:
97+
- all
98+
- comment
99+
- ref/create
100+
- ref/delete
101+
- release
102+
- push
103+
- issue
104+
- pr
105+
- review
106+
- wiki
107+
- fork
108+
- star
109+
- member
110+
- public

0 commit comments

Comments
 (0)
Failed to load comments.