The great refactor (#82)
This commit is contained in:
15
.github/readme/partials/documentation/compatibility.md
vendored
Normal file
15
.github/readme/partials/documentation/compatibility.md
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
### 🧰 Template/plugin compatibily matrix
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th nowrap="nowrap">Template\Plugin</th><%# -%>
|
||||
<% for (const [plugin, {icon}] of Object.entries(plugins).filter(([key, value]) => (value)&&(!["core"].includes(key)))) { %>
|
||||
<th nowrap="nowrap" align="center"><%= icon %></th><% } %>
|
||||
</tr><%# -%>
|
||||
<% for (const [template, {name, readme}] of Object.entries(templates).filter(([key, value]) => (value)&&(!["community"].includes(key)))) { %>
|
||||
<tr>
|
||||
<th nowrap="nowrap"><%= name %></th><%# -%>
|
||||
<% for (const [plugin] of Object.entries(plugins).filter(([key, value]) => (value)&&(!["core"].includes(key)))) { %>
|
||||
<th nowrap="nowrap" align="center" data-plugin="<%= plugin %>"><%= readme.compatibility[plugin] ? "✔️" : "❌" %></th><% } %>
|
||||
</tr><% } %>
|
||||
</table>
|
||||
9
.github/readme/partials/documentation/contributing.md
vendored
Normal file
9
.github/readme/partials/documentation/contributing.md
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
## 💪 Customizing and contributing
|
||||
|
||||
Metrics is built to be easily customizable.
|
||||
Fork this repository, switch used action from `lowlighter/metrics@latest` to your fork and start coding!
|
||||
|
||||
To suggest a new feature, report a bug or ask for help, fill an [issue](https://github.com/lowlighter/metrics/issues) describing it.
|
||||
|
||||
If you want to contribute, submit a [pull request](https://github.com/lowlighter/metrics/pulls).
|
||||
Be sure to read [CONTRIBUTING.md](CONTRIBUTING.md) for more information about this.
|
||||
48
.github/readme/partials/documentation/organizations.md
vendored
Normal file
48
.github/readme/partials/documentation/organizations.md
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
### 🏦 Organizations metrics
|
||||
|
||||
While metrics targets mainly user accounts, it's possible to render metrics for organization accounts.
|
||||
|
||||

|
||||
|
||||
<details>
|
||||
<summary>💬 Metrics for organizations</summary>
|
||||
|
||||
Setup is the same as for user accounts, though you'll need to add `read:org` scope, **whether you're member of target organization or not**.
|
||||
|
||||

|
||||
|
||||
You'll also need to set `user` option with your organization name.
|
||||
|
||||
If you're encounting errors and your organization is using single sign-on, try to [authorize your personal token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on).
|
||||
|
||||
Most of plugins supported by user accounts will work with organization accounts, but note that rendering metrics for organizations consume way more APIs requests.
|
||||
|
||||
To support private repositories, add full `repo` scope to your personal token.
|
||||
|
||||
#### ℹ️ Example workflow
|
||||
|
||||
```yaml
|
||||
- uses: lowlighter/metrics@latest
|
||||
with:
|
||||
# ... other options
|
||||
token: ${{ secrets.METRICS_TOKEN }} # A personal token from an user account with read:org scope
|
||||
committer_token: ${{ secrets.GITHUB_TOKEN }} # GitHub auto-generated token
|
||||
user: organization-name # Organization name
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>💬 Organizations memberships for user accounts</summary>
|
||||
|
||||
Only public memberships can be displayed by metrics by default.
|
||||
You can manage your membership visibility in the `People` tab of your organization:
|
||||
|
||||

|
||||
|
||||
For organization memberships, add `read:org` scope to your personal token.
|
||||
|
||||

|
||||
|
||||
|
||||
</details>
|
||||
7
.github/readme/partials/documentation/plugins.md
vendored
Normal file
7
.github/readme/partials/documentation/plugins.md
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
## 🧩 Plugins
|
||||
|
||||
Plugins are features which provide additional content and lets you customize your rendered metrics.
|
||||
See their respective documentation for more informations about how to setup them:
|
||||
<% for (const [plugin, {name}] of Object.entries(plugins).filter(([key, value]) => value)) { %>
|
||||
* [<%= name %>](/source/plugins/<%= plugin %>/README.md)<%# -%>
|
||||
<% } %>
|
||||
7
.github/readme/partials/documentation/templates.md
vendored
Normal file
7
.github/readme/partials/documentation/templates.md
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
## 🖼️ Templates
|
||||
|
||||
Templates lets you change general appearance of rendered metrics.
|
||||
See their respective documentation for more informations about how to setup them:
|
||||
<% for (const [template, {name}] of Object.entries(templates).filter(([key, value]) => value)) { %>
|
||||
* [<%= name %>](/source/templates/<%= template %>/README.md)<%# -%>
|
||||
<% } %>
|
||||
Reference in New Issue
Block a user