From 84122e71bf3e99378d15279dec6aa02722deb52a Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Fri, 14 Jan 2022 18:54:45 -0500 Subject: [PATCH] docs(templates): add `examples.yml` --- source/plugins/core/examples.yml | 113 ++--------------------- source/templates/classic/examples.yml | 7 ++ source/templates/community/examples.yml | 9 ++ source/templates/markdown/examples.yml | 53 +++++++++++ source/templates/repository/examples.yml | 12 +++ source/templates/terminal/examples.yml | 7 ++ 6 files changed, 98 insertions(+), 103 deletions(-) create mode 100644 source/templates/classic/examples.yml create mode 100644 source/templates/community/examples.yml create mode 100644 source/templates/markdown/examples.yml create mode 100644 source/templates/repository/examples.yml create mode 100644 source/templates/terminal/examples.yml diff --git a/source/plugins/core/examples.yml b/source/plugins/core/examples.yml index 273f5fb9..a6b3e211 100644 --- a/source/plugins/core/examples.yml +++ b/source/plugins/core/examples.yml @@ -1,106 +1,3 @@ -- name: Classic template - uses: lowlighter/metrics@latest - with: - filename: metrics.classic.svg - token: ${{ secrets.METRICS_TOKEN }} - base: header, repositories - plugin_lines: yes - -- name: Repository template - uses: lowlighter/metrics@latest - with: - template: repository - filename: metrics.repository.svg - token: ${{ secrets.METRICS_BOT_TOKEN }} - user: lowlighter - repo: metrics - plugin_lines: yes - plugin_followup: yes - plugin_projects: yes - plugin_projects_repositories: lowlighter/metrics/projects/1 - -- name: Terminal template - uses: lowlighter/metrics@latest - with: - template: terminal - filename: metrics.terminal.svg - token: ${{ secrets.METRICS_TOKEN }} - base: header, metadata - -- name: Markdown template - uses: lowlighter/metrics@latest - with: - template: markdown - filename: metrics.markdown.md - markdown: metrics.markdown.template.md - config_output: markdown - token: ${{ secrets.METRICS_TOKEN }} - -- name: Markdown template (with plugins) - uses: lowlighter/metrics@latest - with: - template: markdown - filename: metrics.markdown.full.md - markdown: https://raw.githubusercontent.com/lowlighter/metrics/master/source/templates/markdown/example.md - config_output: markdown - plugin_activity: yes - plugin_activity_limit: 7 - plugin_activity_days: 0 - plugin_activity_filter: issue, pr, release, fork, review, ref/create - plugin_posts: yes - plugin_posts_source: dev.to - plugin_posts_descriptions: yes - plugin_posts_covers: yes - plugin_posts_limit: 2 - plugin_rss: yes - plugin_rss_source: https://news.ycombinator.com/rss - plugin_rss_limit: 4 - plugin_tweets: yes - plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }} - plugin_tweets_user: github - plugin_tweets_attachments: yes - plugin_tweets_limit: 2 - plugin_topics: yes - plugin_topics_limit: 24 - plugin_isocalendar: yes - plugin_languages: yes - token: ${{ secrets.METRICS_TOKEN }} - -- name: Markdown template (pdf output) - uses: lowlighter/metrics@latest - with: - template: markdown - filename: metrics.markdown.pdf - markdown: https://raw.githubusercontent.com/lowlighter/metrics/master/source/templates/markdown/example.pdf.md - config_output: markdown-pdf - plugin_rss: yes - plugin_rss_source: https://news.ycombinator.com/rss - plugin_rss_limit: 4 - plugin_isocalendar: yes - config_twemoji: yes - config_padding: 5% - token: ${{ secrets.METRICS_TOKEN }} - -- name: Community templates - uses: lowlighter/metrics@latest - with: - token: ${{ secrets.METRICS_TOKEN }} - template: "@classic" - setup_community_templates: "lowlighter/metrics@master:classic" - test: - modes: - - action - -- name: Plugin error example - uses: lowlighter/metrics@latest - with: - filename: metrics.plugin.error.svg - token: ${{ secrets.METRICS_TOKEN }} - base: "" - plugin_projects: yes - test: - skip: true - - name: Organization uses: lowlighter/metrics@latest with: @@ -131,3 +28,13 @@ filename: metrics.example.png token: ${{ secrets.METRICS_TOKEN }} config_output: png + +- name: Plugin error example + uses: lowlighter/metrics@latest + with: + filename: metrics.plugin.error.svg + token: ${{ secrets.METRICS_TOKEN }} + base: "" + plugin_projects: yes + test: + skip: true \ No newline at end of file diff --git a/source/templates/classic/examples.yml b/source/templates/classic/examples.yml new file mode 100644 index 00000000..9d8cc461 --- /dev/null +++ b/source/templates/classic/examples.yml @@ -0,0 +1,7 @@ +- name: Example + uses: lowlighter/metrics@latest + with: + filename: metrics.classic.svg + token: ${{ secrets.METRICS_TOKEN }} + base: header, repositories + plugin_lines: yes diff --git a/source/templates/community/examples.yml b/source/templates/community/examples.yml new file mode 100644 index 00000000..41a7e18b --- /dev/null +++ b/source/templates/community/examples.yml @@ -0,0 +1,9 @@ +- name: Example + uses: lowlighter/metrics@latest + with: + token: ${{ secrets.METRICS_TOKEN }} + template: "@classic" + setup_community_templates: "lowlighter/metrics@master:classic" + test: + modes: + - action \ No newline at end of file diff --git a/source/templates/markdown/examples.yml b/source/templates/markdown/examples.yml new file mode 100644 index 00000000..ec0a3a8f --- /dev/null +++ b/source/templates/markdown/examples.yml @@ -0,0 +1,53 @@ +- name: Example + uses: lowlighter/metrics@latest + with: + template: markdown + filename: metrics.markdown.md + markdown: metrics.markdown.template.md + config_output: markdown + token: ${{ secrets.METRICS_TOKEN }} + +- name: Example with plugins configuration for embed use + uses: lowlighter/metrics@latest + with: + template: markdown + filename: metrics.markdown.full.md + markdown: https://raw.githubusercontent.com/lowlighter/metrics/master/source/templates/markdown/example.md + config_output: markdown + plugin_activity: yes + plugin_activity_limit: 7 + plugin_activity_days: 0 + plugin_activity_filter: issue, pr, release, fork, review, ref/create + plugin_posts: yes + plugin_posts_source: dev.to + plugin_posts_descriptions: yes + plugin_posts_covers: yes + plugin_posts_limit: 2 + plugin_rss: yes + plugin_rss_source: https://news.ycombinator.com/rss + plugin_rss_limit: 4 + plugin_tweets: yes + plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }} + plugin_tweets_user: github + plugin_tweets_attachments: yes + plugin_tweets_limit: 2 + plugin_topics: yes + plugin_topics_limit: 24 + plugin_isocalendar: yes + plugin_languages: yes + token: ${{ secrets.METRICS_TOKEN }} + +- name: Example (pdf output) + uses: lowlighter/metrics@latest + with: + template: markdown + filename: metrics.markdown.pdf + markdown: https://raw.githubusercontent.com/lowlighter/metrics/master/source/templates/markdown/example.pdf.md + config_output: markdown-pdf + plugin_rss: yes + plugin_rss_source: https://news.ycombinator.com/rss + plugin_rss_limit: 4 + plugin_isocalendar: yes + config_twemoji: yes + config_padding: 5% + token: ${{ secrets.METRICS_TOKEN }} diff --git a/source/templates/repository/examples.yml b/source/templates/repository/examples.yml new file mode 100644 index 00000000..6997462b --- /dev/null +++ b/source/templates/repository/examples.yml @@ -0,0 +1,12 @@ +- name: Example + uses: lowlighter/metrics@latest + with: + template: repository + filename: metrics.repository.svg + token: ${{ secrets.METRICS_BOT_TOKEN }} + user: lowlighter + repo: metrics + plugin_lines: yes + plugin_followup: yes + plugin_projects: yes + plugin_projects_repositories: lowlighter/metrics/projects/1 \ No newline at end of file diff --git a/source/templates/terminal/examples.yml b/source/templates/terminal/examples.yml new file mode 100644 index 00000000..8b2b846a --- /dev/null +++ b/source/templates/terminal/examples.yml @@ -0,0 +1,7 @@ +- name: Example + uses: lowlighter/metrics@latest + with: + template: terminal + filename: metrics.terminal.svg + token: ${{ secrets.METRICS_TOKEN }} + base: header, metadata