repo: reorder .github
This commit is contained in:
19
.github/scripts/quickstart/plugin/README.md
vendored
Normal file
19
.github/scripts/quickstart/plugin/README.md
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
### 🧩 <%= `${name.charAt(0).toLocaleUpperCase()}${name.substring(1)}` %>
|
||||
|
||||
<table>
|
||||
<td align="center">
|
||||
<img src="">
|
||||
<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_<%= name %>: yes
|
||||
```
|
||||
7
.github/scripts/quickstart/plugin/examples.yml
vendored
Normal file
7
.github/scripts/quickstart/plugin/examples.yml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
- name: <%= `${name.charAt(0).toLocaleUpperCase()}${name.substring(1)}` %> plugin (default)
|
||||
uses: lowlighter/metrics@latest
|
||||
with:
|
||||
filename: metrics.plugin.<%= name %>.svg
|
||||
token: ${{ secrets.METRICS_TOKEN }}
|
||||
base: ""
|
||||
plugin_<%= name %>: yes
|
||||
15
.github/scripts/quickstart/plugin/index.mjs
vendored
Normal file
15
.github/scripts/quickstart/plugin/index.mjs
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
//Setup
|
||||
export default async function({login, q, imports, data, computed, rest, graphql, queries, account}, {enabled = false} = {}) {
|
||||
//Plugin execution
|
||||
try {
|
||||
//Check if plugin is enabled and requirements are met
|
||||
if ((!enabled)||(!q.<%= name %>))
|
||||
return null
|
||||
//Results
|
||||
return {}
|
||||
}
|
||||
//Handle errors
|
||||
catch (error) {
|
||||
throw {error:{message:"An error occured", instance:error}}
|
||||
}
|
||||
}
|
||||
14
.github/scripts/quickstart/plugin/metadata.yml
vendored
Normal file
14
.github/scripts/quickstart/plugin/metadata.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
name: "🧩 <%= `${name.charAt(0).toLocaleUpperCase()}${name.substring(1)}` %>"
|
||||
category: community # Leave as it
|
||||
supports:
|
||||
- user # Support users account
|
||||
- organization # Support organizations account
|
||||
- repository # Support repositories metrics
|
||||
scopes: [] # Required scopes for personal access token
|
||||
inputs:
|
||||
|
||||
# Enable or disable plugin
|
||||
plugin_<%= name %>:
|
||||
description: description
|
||||
type: boolean
|
||||
default: no
|
||||
Reference in New Issue
Block a user