Add quickstart commands
This commit is contained in:
19
.github/quickstart/plugin/README.md
vendored
Normal file
19
.github/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
|
||||
```
|
||||
15
.github/quickstart/plugin/index.mjs
vendored
Normal file
15
.github/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}}
|
||||
}
|
||||
}
|
||||
19
.github/quickstart/plugin/metadata.yml
vendored
Normal file
19
.github/quickstart/plugin/metadata.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: "🧩 <%= `${name.charAt(0).toLocaleUpperCase()}${name.substring(1)}` %>"
|
||||
|
||||
# Estimate of how many GitHub requests will be used
|
||||
cost: N/A
|
||||
|
||||
# Supported modes
|
||||
supports:
|
||||
- user
|
||||
- organization
|
||||
- repository
|
||||
|
||||
# Inputs list
|
||||
inputs:
|
||||
|
||||
# Enable or disable plugin
|
||||
plugin_<%= name %>:
|
||||
description: description
|
||||
type: boolean
|
||||
default: no
|
||||
5
.github/quickstart/plugin/tests.yml
vendored
Normal file
5
.github/quickstart/plugin/tests.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
- name: <%= `${name.charAt(0).toLocaleUpperCase()}${name.substring(1)}` %> plugin (default)
|
||||
uses: lowlighter/metrics@latest
|
||||
with:
|
||||
token: MOCKED_TOKEN
|
||||
plugin_<%= name %>: yes
|
||||
Reference in New Issue
Block a user