docs: reference the optional need of read:packages [skip ci]

This commit is contained in:
lowlighter
2022-04-23 13:16:30 -04:00
parent 846be4bb46
commit 5112b04e29
3 changed files with 6 additions and 4 deletions

View File

@@ -356,7 +356,7 @@ metadata.plugin = async function({__plugins, __templates, name, logger}) {
` <td>${[
...(meta.scopes ?? []).map(scope => `<code>🔑 ${{public_access:"(scopeless)"}[scope] ?? scope}</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>`,
" </tr>",
" <tr>",

View File

@@ -223,9 +223,10 @@
` # The following scopes are required:`,
...[...this.scopes].map(scope => ` # - ${scope}${scope === "public_access" ? " (default scope)" : ""}`),
` # The following additional scopes may be required:`,
` # - read:org (for organization related metrics)`,
` # - read:user (for user related data)`,
` # - repo (optional, if you want to include private repositories)`,
` # - read:org (for organization related metrics)`,
` # - read:user (for user related data)`,
` # - read:packages (for some packages related data)`,
` # - repo (optional, if you want to include private repositories)`,
]
: [
` # Current configuration doesn't require a GitHub token`,