Skip to content

Latest commit

 

History

History
187 lines (177 loc) · 6.64 KB

README.md

File metadata and controls

187 lines (177 loc) · 6.64 KB
← Back to plugins index

✨ Stargazers

This plugin displays stargazers evolution across affiliated repositories.

⚠️ Disclaimer

This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with GitHub. All product and company names are trademarks™ or registered® trademarks of their respective holders.

Supported features
→ Full specification
📗 Classic template 📘 Repository template
👤 Users 👥 Organizations 📓 Repositories
🔑 (scopeless) 🗝️ plugin_stargazers_worldmap_token read:org (optional) read:user (optional) read:packages (optional) repo (optional)
Classic charts
Graph charts
Worldmap

🗝️ Obtaining a Google Maps API token

Some features like plugin_stagazers_worldmap require a Google Geocoding API token. Follow instructions from their documentation for more informations.

💳 A billing account is required to get a token. However a recurring monthly credit is offered which means you should not be charged if you don't exceed the free quota.

It is advised to set the quota limit at 1200 requests per day

Use at your own risk, metrics and its authors cannot be held responsible for anything charged.

➡️ Available options

OptionDescription

plugin_stargazers

Enable stargazers plugin

type: boolean
default: no

plugin_stargazers_days

Time range

If set to 0 the account registration date will be used.

type: number (0 ≤ 𝑥)
zero behaviour: see description
default: 14

plugin_stargazers_charts

Charts

It includes total number of stargazers evolution, along with the number of new stars per day over the last two weeks.

type: boolean
default: yes

plugin_stargazers_charts_type

Charts display type

  • classic: <div> based charts, simple and lightweight
  • graph: <svg> based charts, smooth

⚠️ chartist option has been deprecated and is now equivalent to graph

🌐 Web instances must configure settings.json:
  • metrics.npm.optional.d3
type: string
default: classic
allowed values:
  • classic
  • graph
  • chartist

plugin_stargazers_worldmap

Stargazers worldmap

🌐 Web instances must configure settings.json:
  • metrics.api.google.maps
  • metrics.npm.optional.d3
type: boolean
default: no

plugin_stargazers_worldmap_token

Stargazers worldmap token

🔐 Token
type: token

plugin_stargazers_worldmap_sample

Stargazers worldmap sample

Use this setting to randomly sample and limit your stargazers. Helps to avoid consuming too much Google Geocoding API requests while still being representative.

type: number (0 ≤ 𝑥)
zero behaviour: disable
default: 0

ℹ️ Examples workflows

name: Using classic charts
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.stargazers.svg
  token: ${{ secrets.METRICS_TOKEN }}
  base: ""
  plugin_stargazers: yes
name: Using graph charts
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.stargazers.graph.svg
  token: ${{ secrets.METRICS_TOKEN }}
  base: ""
  plugin_stargazers: yes
  plugin_stargazers_charts_type: graph
name: With worldmap
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.stargazers.worldmap.svg
  token: ${{ secrets.METRICS_TOKEN }}
  base: ""
  plugin_stargazers: yes
  plugin_stargazers_charts: no
  plugin_stargazers_worldmap: yes
  plugin_stargazers_worldmap_token: ${{ secrets.GOOGLE_MAP_TOKEN }}
  plugin_stargazers_worldmap_sample: 200