Package Documentation
Storm Package: synapse-github
The following Commands are available from this package. This documentation is generated for version 3.0.0 of the package.
Storm Commands
This package implements the following Storm Commands.
github.code.search
Search GitHub code and create it:dev:repo and it:dev:repo:entry nodes for the
repositories and file paths that match. Raw file content is not ingested.
The query uses GitHub code search syntax. GitHub code search requires the file to
be on the repository's default branch and generally requires a scoping qualifier
(for example "repo:", "org:", or "user:").
Examples:
// Yield up to 5 file entries matching "addNode" in the vertexproject/synapse repo
github.code.search "addNode repo:vertexproject/synapse" --yield --size 5
Usage: github.code.search [options] <query>
Options:
--help : Display the command usage.
--debug : Show verbose debug output.
--size <size> : Limit the number of results ingested to the given size.
--yield : Yield the newly created nodes.
--config <config> : Override the default config with the provided name.
Arguments:
<query> : The GitHub code search query.
The command is accessible to users with one or more of the following permissions:
power-ups.github.adminpower-ups.github.user
github.commits.search
Search GitHub commits and create it:dev:repo:commit nodes for the results.
The query uses GitHub commit search syntax. Scope the query (for example with a
"repo:", "org:", or "user:" qualifier) to keep results relevant. Commits whose
author GitHub has linked to an account will also create an inet:service:account
with the author's email address, which is useful for pivoting to other accounts.
Examples:
// Yield up to 10 commits authored under a particular email in the vertexproject org
github.commits.search "org:vertexproject author-email:visi@vertex.link" --yield --size 10
Usage: github.commits.search [options] <query>
Options:
--help : Display the command usage.
--debug : Show verbose debug output.
--size <size> : Limit the number of results ingested to the given size.
--yield : Yield the newly created nodes.
--config <config> : Override the default config with the provided name.
Arguments:
<query> : The GitHub commit search query.
The command is accessible to users with one or more of the following permissions:
power-ups.github.adminpower-ups.github.user
github.config.add
Add a Synapse-GitHub configuration.
The proxy argument can be set to one of the following values:
true: Use the Cortex configured proxy if set.
false: Do not use the Cortex configured proxy if set.
<str>: A proxy URL to use.
Examples:
// Add a global configuration
github.config.add default myapikey1234
// Add a configuration for the current user
github.config.add --scope self myconfig myapikey5678
Usage: github.config.add [options] <name> <apikey>
Options:
--help : Display the command usage.
--ssl-noverify : Do not perform SSL/TLS verification.
--proxy <proxy> : Configure the proxy usage. (default: True)
--scope <scope> : Set the scope on the configuration. (default: global, choices: global, self, unscoped)
Arguments:
<name> : A unique name for the configuration.
<apikey> : The GitHub API key string.
The command is accessible to users with one or more of the following permissions:
power-ups.github.adminpower-ups.github.user
github.config.del
Delete a Synapse-GitHub configuration.
Examples:
// Delete the "myconfig" configuration
github.config.del myconfig
Usage: github.config.del [options] <name>
Options:
--help : Display the command usage.
Arguments:
<name> : The name of the configuration.
The command is accessible to users with one or more of the following permissions:
power-ups.github.adminpower-ups.github.user
github.config.list
Display the list of Synapse-GitHub configurations you have access to.
Usage: github.config.list [options]
Options:
--help : Display the command usage.
The command is accessible to users with one or more of the following permissions:
power-ups.github.adminpower-ups.github.user
github.config.migrate
Migrate options for all Synapse-GitHub configurations.
The proxy argument can be set to one of the following values:
true: Use the Cortex configured proxy if set.
false: Do not use the Cortex configured proxy if set.
<str>: A proxy URL to use.
Examples:
// Disable SSL verification for all configurations
github.config.migrate --ssl-verify (false)
Usage: github.config.migrate [options]
Options:
--help : Display the command usage.
--ssl-verify <ssl_verify> : Set whether to verify the SSL certificate of the server. (default: None)
--proxy <proxy> : Configure the proxy usage. (default: None)
The command is accessible to users with one or more of the following permissions:
power-ups.github.admin
github.config.show
Show the details of a configuration.
Examples:
// Show the in-use configuration for the current user
github.config.show
// Show a configuration by name
github.config.show myconfig
Usage: github.config.show [options] <name>
Options:
--help : Display the command usage.
Arguments:
[name] : The name of the configuration.
The command is accessible to users with one or more of the following permissions:
power-ups.github.adminpower-ups.github.user
github.config.update
Update the configuration of a defined Synapse-GitHub configuration.
The proxy argument can be set to one of the following values:
true: Use the Cortex configured proxy if set.
false: Do not use the Cortex configured proxy if set.
<str>: A proxy URL to use.
Examples:
// Set the permission level for user "myuser" to "admin" on the "myconfig"
// configuration
github.config.update myconfig --perm user myuser admin
// Set the permission level for the "all" role to "deny" on the
// "myconfig" configuration
github.config.update myconfig --perm role all deny
// Do not verify the SSL certificate when connecting to "myconfig"
github.config.update myconfig --ssl-verify (false)
// Change the name of the "myconfig" configuration to "otherconfig"
github.config.update myconfig --name otherconfig
Usage: github.config.update [options] <config>
Options:
--help : Display the command usage.
--apikey <apikey> : The GitHub API key string. (default: None)
--perm <perm> : Set the permission level for a user or role on this configuration.
Arguments to this option are ``scope``, ``name``, ``level``:
<scope>: The scope for the permission, either "user" or "role".
<name>: The user/role name depending on scope.
<level>: The $lib.auth.easyperm.level, or None to remove the permission.
(default: None)
--ssl-verify <ssl_verify> : Set whether to verify the SSL certificate of the server. (default: None)
--proxy <proxy> : Configure the proxy usage. (default: None)
--name <name> : Rename the configuration. (default: None)
Arguments:
<config> : The name of the configuration to modify.
The command is accessible to users with one or more of the following permissions:
power-ups.github.adminpower-ups.github.user
github.issues.comments
Retrieve all the comments for a single GitHub issue.
Examples:
// Ingest 10 of the comments for the first issue with an ID of "583"
it:dev:repo:issue:id=538 | limit 1 | github.issues.comments --yield --debug --size 10
Usage: github.issues.comments [options]
Options:
--help : Display the command usage.
--debug : Show verbose debug output.
--size <size> : Limit the number of results ingested to the given size (per-node).
--yield : Yield the newly created nodes.
--config <config> : Override the default config with the provided name.
Inputs:
it:dev:repo:issue : it:dev:repo:issue nodes
The command is accessible to users with one or more of the following permissions:
power-ups.github.adminpower-ups.github.user
github.issues.pull
Retrieve the list of issues associated with a particular GitHub repository.
Examples:
// Yield the list of every issue associated with the "vertexproject/synapse" GitHub repo.
it:dev:repo:name=vertexproject/synapse | github.issues.pull --yield
// Yield up to 10 of the open issues associated with a particular GitHub repo.
github.issues.pull --repo vertexproject/synapse --yield --state open --size 10
Usage: github.issues.pull [options]
Options:
--help : Display the command usage.
--repo <repo> : The name of a specific repo to retrieve.
--state <state> : Filter the returned issues to only issues in the specified state. Valid values are
"all", "closed", and "open". (default: all)
--debug : Show verbose debug output.
--size <size> : Limit the number of results ingested to the given size.
--yield : Yield the newly created nodes.
--config <config> : Override the default config with the provided name.
Inputs:
it:dev:repo : it:dev:repo nodes
The command is accessible to users with one or more of the following permissions:
power-ups.github.adminpower-ups.github.user
github.issues.search
Search GitHub issues and create it:dev:repo:issue nodes for the results. Pull
requests returned by the search are skipped.
The query uses GitHub issue search syntax. The repository for each matching issue
is resolved and created as an it:dev:repo node.
Examples:
// Yield up to 10 closed issues mentioning "deadlock" in the vertexproject/synapse repo
github.issues.search "deadlock repo:vertexproject/synapse state:closed" --yield --size 10
Usage: github.issues.search [options] <query>
Options:
--help : Display the command usage.
--debug : Show verbose debug output.
--size <size> : Limit the number of results ingested to the given size.
--yield : Yield the newly created nodes.
--config <config> : Override the default config with the provided name.
Arguments:
<query> : The GitHub issue search query.
The command is accessible to users with one or more of the following permissions:
power-ups.github.adminpower-ups.github.user
github.repos.pull
Retrieve information about all the repos that an account owns and create it:dev:repo nodes for them.
Examples:
// Yield up to 5 repos owned by the "vertexproject" GitHub account
github.repos.pull "vertexproject" --size 5 --yield --debug
Usage: github.repos.pull [options] <owner>
Options:
--help : Display the command usage.
--debug : Show verbose debug output.
--size <size> : Limit the number of results ingested to the given size (per-node).
--yield : Yield the newly created nodes.
--config <config> : Override the default config with the provided name.
Arguments:
<owner> : The username to pull repos for.
The command is accessible to users with one or more of the following permissions:
power-ups.github.adminpower-ups.github.user
Storm Modules
This package does not export any Storm APIs.