Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ For all actions, the tool will ask you to input a GitHub token. To obtain this t

## Other Options

| Option | Notes |
| ----------------------- | ---------------------------------------------------- |
| -V, --version | output the version number |
| -g, --github_enterprise | Your GitHub Enterprise URL. |
| -t, --token | The GitHub token. https://github.com/settings/tokens |
| -h, --help | See all the options and help. |
| Option | Notes |
| ----------------------- | -------------------------------------------------------- |
| -V, --version | output the version number |
| -g, --github_enterprise | Your GitHub Enterprise URL. |
| -t, --token | The GitHub token. https://github.com/settings/tokens |
| -o, --organization | The User or Organization slug that the repo lives under. |
| -r, --repository | The repository name (slug). |
| -h, --help | See all the options and help. |

## Development

Expand Down
17 changes: 15 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ program
"-t, --token [token]",
"The GitHub token. https://github.com/settings/tokens"
)
.option(
"-o, --organization [organization]",
"The User or Organization slug that the repo lives under."
)
.option("-r, --repository [repository]", "The repository name (slug).")
.option(
"-f, --exportFileName [export.csv]",
"The name of the CSV you'd like to export to."
Expand Down Expand Up @@ -49,8 +54,16 @@ program
.map((i) => i.trim());
}
retObject.exportComments = options.exportComments || false;
retObject.userOrOrganization = yield prompt("user or organization: ");
retObject.repo = yield prompt("repo: ");

retObject.userOrOrganization = options.organization || "";
if (retObject.userOrOrganization === "") {
retObject.userOrOrganization = yield prompt("user or organization: ");
}

retObject.repo = options.repository || "";
if (retObject.repo === "") {
retObject.repo = yield prompt("repository: ");
}
return retObject;
}).then(
function (values) {
Expand Down