Add "repo" option (syntaxic sugar for query) and defaults committer_token
This commit is contained in:
@@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
//Core inputs
|
//Core inputs
|
||||||
const {
|
const {
|
||||||
user:_user, token,
|
user:_user, repo:_repo, token,
|
||||||
template, query, "setup.community.templates":_templates,
|
template, query, "setup.community.templates":_templates,
|
||||||
filename, optimize, verify,
|
filename, optimize, verify,
|
||||||
debug, "debug.flags":dflags, "use.mocked.data":mocked, dryrun,
|
debug, "debug.flags":dflags, "use.mocked.data":mocked, dryrun,
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
"use.prebuilt.image":_image,
|
"use.prebuilt.image":_image,
|
||||||
...config
|
...config
|
||||||
} = metadata.plugins.core.inputs.action({core})
|
} = metadata.plugins.core.inputs.action({core})
|
||||||
const q = {...query, template}
|
const q = {...query, repo:_repo, template}
|
||||||
|
|
||||||
//Docker image
|
//Docker image
|
||||||
if (_image)
|
if (_image)
|
||||||
@@ -101,6 +101,8 @@
|
|||||||
}
|
}
|
||||||
const user = _user || authenticated
|
const user = _user || authenticated
|
||||||
info("GitHub account", user)
|
info("GitHub account", user)
|
||||||
|
if (q.repo)
|
||||||
|
info("GitHub repository", `${user}/${q.repo}`)
|
||||||
|
|
||||||
//Current repository
|
//Current repository
|
||||||
info("Current repository", `${github.context.repo.owner}/${github.context.repo.repo}`)
|
info("Current repository", `${github.context.repo.owner}/${github.context.repo.repo}`)
|
||||||
|
|||||||
@@ -18,16 +18,26 @@ inputs:
|
|||||||
required: true
|
required: true
|
||||||
|
|
||||||
# GitHub username
|
# GitHub username
|
||||||
|
# Defaults to "token" owner
|
||||||
user:
|
user:
|
||||||
description: GitHub username
|
description: GitHub username
|
||||||
type: string
|
type: string
|
||||||
default: "" # Defaults to "token" owner
|
default: ""
|
||||||
|
|
||||||
# Set to "${{ secrets.GITHUB_TOKEN }}"
|
# GitHub repository
|
||||||
|
# Compute metrics for a repository instead ("user" being the repository owner)
|
||||||
|
# Check https://github.com/lowlighter/metrics/blob/master/source/templates/repository/README.md for more informations
|
||||||
|
repo:
|
||||||
|
description: GitHub repository
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
|
||||||
|
# Set to "${{ github.token }}" or "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
# GITHUB_TOKEN is a special auto-generated token restricted to current repository, which is used to push files in it
|
||||||
committer_token:
|
committer_token:
|
||||||
description: GitHub Token used to commit metrics
|
description: GitHub Token used to commit metrics
|
||||||
type: token
|
type: token
|
||||||
default: "" # Defaults to "token"
|
default: ${{ github.token }}
|
||||||
|
|
||||||
# Branch used to commit rendered metrics
|
# Branch used to commit rendered metrics
|
||||||
committer_branch:
|
committer_branch:
|
||||||
|
|||||||
Reference in New Issue
Block a user