The great refactor (#82)

This commit is contained in:
Simon Lecoq
2021-01-30 12:31:09 +01:00
committed by GitHub
parent f8c6d19a4e
commit 682e43e10b
158 changed files with 6738 additions and 5022 deletions

View File

@@ -0,0 +1,22 @@
### 🎟️ Follow-up of issues and pull requests
The *followup* plugin displays the ratio of open/closed issues and the ratio of open/merged pull requests across all your repositories, which shows if they're well-maintained or not.
<table>
<td align="center">
<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.followup.svg">
<img width="900" height="1" alt="">
</td>
</table>
#### Examples workflows
[➡️ Available options for this plugin](metadata.yml)
```yaml
- uses: lowlighter/metrics@latest
with:
# ... other options
plugin_followup: yes
```

View File

@@ -1,10 +1,14 @@
//Setup
export default async function ({computed, q}, {enabled = false} = {}) {
export default async function ({data, computed, imports, q, account}, {enabled = false} = {}) {
//Plugin execution
try {
//Check if plugin is enabled and requirements are met
if ((!enabled)||(!q.followup))
return null
//Load inputs
imports.metadata.plugins.followup.inputs({data, account, q})
//Define getters
const followup = {
issues:{
@@ -18,6 +22,7 @@
get merged() { return computed.repositories.pr_merged }
}
}
//Results
return followup
}

View File

@@ -0,0 +1,13 @@
name: "🎟️ Follow-up of issues and pull requests"
cost: 0 API request
supports:
- user
- organization
- repository
inputs:
# Enable or disable plugin
plugin_followup:
description: Display follow-up of repositories issues and pull requests
type: boolean
default: no