docs: reference the optional need of read:packages [skip ci]
This commit is contained in:
@@ -25,6 +25,7 @@ A a general rule, the following scopes may be required:
|
|||||||
- `read:org` for all organizations related metrics
|
- `read:org` for all organizations related metrics
|
||||||
- `repo` for all private repositories related metrics
|
- `repo` for all private repositories related metrics
|
||||||
- `read:user` for some private repositories related metrics
|
- `read:user` for some private repositories related metrics
|
||||||
|
- `read:packages` for some packages related metrics
|
||||||
- `gist` for publishing renders to gists instead of a repository
|
- `gist` for publishing renders to gists instead of a repository
|
||||||
|
|
||||||
> 💡 For security reasons, it is advised to always use the least amount of scopes. It is possible to prevent security issues by [forking this repository](https://github.com/lowlighter/metrics/fork) and using it in your workflow instead (more information available in step 3)
|
> 💡 For security reasons, it is advised to always use the least amount of scopes. It is possible to prevent security issues by [forking this repository](https://github.com/lowlighter/metrics/fork) and using it in your workflow instead (more information available in step 3)
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ metadata.plugin = async function({__plugins, __templates, name, logger}) {
|
|||||||
` <td>${[
|
` <td>${[
|
||||||
...(meta.scopes ?? []).map(scope => `<code>🔑 ${{public_access:"(scopeless)"}[scope] ?? scope}</code>`),
|
...(meta.scopes ?? []).map(scope => `<code>🔑 ${{public_access:"(scopeless)"}[scope] ?? scope}</code>`),
|
||||||
...Object.entries(inputs).filter(([_, {type}]) => type === "token").map(([token]) => `<code>🗝️ ${token}</code>`),
|
...Object.entries(inputs).filter(([_, {type}]) => type === "token").map(([token]) => `<code>🗝️ ${token}</code>`),
|
||||||
...(meta.scopes?.length ? ["read:org", "read:user", "repo"].map(scope => !meta.scopes.includes(scope) ? `<code>${scope} (optional)</code>` : null).filter(v => v) : []),
|
...(meta.scopes?.length ? ["read:org", "read:user", "read:packages", "repo"].map(scope => !meta.scopes.includes(scope) ? `<code>${scope} (optional)</code>` : null).filter(v => v) : []),
|
||||||
].filter(v => v).join(" ") || "<i>No tokens are required for this plugin</i>"}</td>`,
|
].filter(v => v).join(" ") || "<i>No tokens are required for this plugin</i>"}</td>`,
|
||||||
" </tr>",
|
" </tr>",
|
||||||
" <tr>",
|
" <tr>",
|
||||||
|
|||||||
@@ -223,9 +223,10 @@
|
|||||||
` # The following scopes are required:`,
|
` # The following scopes are required:`,
|
||||||
...[...this.scopes].map(scope => ` # - ${scope}${scope === "public_access" ? " (default scope)" : ""}`),
|
...[...this.scopes].map(scope => ` # - ${scope}${scope === "public_access" ? " (default scope)" : ""}`),
|
||||||
` # The following additional scopes may be required:`,
|
` # The following additional scopes may be required:`,
|
||||||
` # - read:org (for organization related metrics)`,
|
` # - read:org (for organization related metrics)`,
|
||||||
` # - read:user (for user related data)`,
|
` # - read:user (for user related data)`,
|
||||||
` # - repo (optional, if you want to include private repositories)`,
|
` # - read:packages (for some packages related data)`,
|
||||||
|
` # - repo (optional, if you want to include private repositories)`,
|
||||||
]
|
]
|
||||||
: [
|
: [
|
||||||
` # Current configuration doesn't require a GitHub token`,
|
` # Current configuration doesn't require a GitHub token`,
|
||||||
|
|||||||
Reference in New Issue
Block a user