docs: updated workflows examples and options descriptions (#772) [skip ci]
This commit is contained in:
@@ -20,18 +20,40 @@ Your user id will be in both url and search bar.
|
||||
|
||||
</details>
|
||||
|
||||
#### ➡️ Available options
|
||||
|
||||
<!--options-->
|
||||
| Option | Type *(format)* **[default]** *{allowed values}* | Description |
|
||||
| ------ | -------------------------------- | ----------- |
|
||||
| `plugin_stackoverflow` | `boolean` **[no]** | Stackoverflow metrics |
|
||||
| `plugin_stackoverflow_user` | `number` **[0]** | Stackoverflow user id |
|
||||
| `plugin_stackoverflow_sections` | `array` *(comma-separated)* **[answers-top, questions-recent]** *{"answers-top", "answers-recent", "questions-top", "questions-recent"}* | Sections to display |
|
||||
| `plugin_stackoverflow_limit` | `number` **[2]** *{1 ≤ 𝑥 ≤ 30}* | Maximum number of entries to display per section |
|
||||
| `plugin_stackoverflow_lines` | `number` **[4]** *{0 ≤ 𝑥}* | Maximum number of lines to display per question or answer |
|
||||
| `plugin_stackoverflow_lines_snippet` | `number` **[2]** *{0 ≤ 𝑥}* | Maximum number of lines to display per code snippet |
|
||||
|
||||
|
||||
Legend for option icons:
|
||||
* 🔐 Value should be stored in repository secrets
|
||||
* ✨ New feature currently in testing on `master`/`main`
|
||||
<!--/options-->
|
||||
|
||||
*[→ Full specification](metadata.yml)*
|
||||
|
||||
#### ℹ️ Examples workflows
|
||||
|
||||
[➡️ Available options for this plugin](metadata.yml)
|
||||
|
||||
<!--examples-->
|
||||
```yaml
|
||||
- uses: lowlighter/metrics@latest
|
||||
with:
|
||||
# ... other options
|
||||
plugin_stackoverflow: yes
|
||||
plugin_stackoverflow_user: 8332505 # Stackoverflow user id (required)
|
||||
plugin_stackoverflow_sections: answers-top, questions-recent # Display top answers and recent questions
|
||||
plugin_stackoverflow_limit: 2 # Display 2 entries per section
|
||||
plugin_stackoverflow_lines: 4 # Display 4 lines per entry
|
||||
plugin_stackoverflow_lines_snippet: 2 # Display 2 lines in embed code snippets
|
||||
```
|
||||
name: Top answers from stackoverflow
|
||||
uses: lowlighter/metrics@latest
|
||||
with:
|
||||
filename: metrics.plugin.stackoverflow.svg
|
||||
token: ${{ secrets.METRICS_TOKEN }}
|
||||
base: ''
|
||||
plugin_stackoverflow: 'yes'
|
||||
plugin_stackoverflow_user: 1
|
||||
plugin_stackoverflow_sections: answers-top
|
||||
plugin_stackoverflow_limit: 2
|
||||
|
||||
```
|
||||
<!--/examples-->
|
||||
10
source/plugins/stackoverflow/examples.yml
Normal file
10
source/plugins/stackoverflow/examples.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
- name: Top answers from stackoverflow
|
||||
uses: lowlighter/metrics@latest
|
||||
with:
|
||||
filename: metrics.plugin.stackoverflow.svg
|
||||
token: ${{ secrets.METRICS_TOKEN }}
|
||||
base: ""
|
||||
plugin_stackoverflow: yes
|
||||
plugin_stackoverflow_user: 1
|
||||
plugin_stackoverflow_sections: answers-top
|
||||
plugin_stackoverflow_limit: 2
|
||||
Reference in New Issue
Block a user