Package Documentation
Storm Package: synapse-github
The following Commands are available from this package. This documentation is generated for version 2.1.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.
Arguments:
<query> : The GitHub code search query.
The command is accessible to users with one or more of the following permissions:
power-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.
Arguments:
<query> : The GitHub commit search query.
The command is accessible to users with one or more of the following permissions:
power-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.
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.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.
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.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.
Arguments:
<query> : The GitHub issue search query.
The command is accessible to users with one or more of the following permissions:
power-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.
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.user
github.setup.apikey
Manage the GitHub API key.
Examples
// Set a global GitHub API key
github.setup.apikey abcd1234
// Set a GitHub API key for the current user
github.setup.apikey --self abcd1234
// Display the API key scope of the current key
github.setup.apikey --show-scope
// Display the current API key.
github.setup.apikey --show-apikey
// Remove the current global API key.
github.setup.apikey --remove
// Remove the per-user API key for the current user.
github.setup.apikey --self --remove
Usage: github.setup.apikey [options] <apikey>
Options:
--help : Display the command usage.
--self : Set or remove the key as a user variable. If not used, the key is set globally.
--show-scope : Display the API key scope in use (global vs self).
--show-apikey : Display the API key value (requires admin perms or a "self" scope key).
--remove : Remove the configured API key. May be used with --self.
Arguments:
[apikey] : The API key string.
The command is accessible to users with one or more of the following permissions:
power-ups.github.user
Storm Modules
This package does not export any Storm APIs.