Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added open pull request flag #11

Closed
wants to merge 2 commits into from
Closed
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
8 changes: 8 additions & 0 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
Options
--prs -p Open the pull requests of a GitHub repo
--issues -i Open the issues of a GitHub repo
--openPullRequest -o Open the pull request of a GitHub repo

Examples
$ gh-home
Expand All @@ -34,6 +35,11 @@
default: false,
alias: 'i',
},
openPullRequest: {
type: 'boolean',
alias: 'o',
hidden: true,
}

Check failure on line 42 in cli.js

View workflow job for this annotation

GitHub Actions / Node.js 16

Missing trailing comma.

Check failure on line 42 in cli.js

View workflow job for this annotation

GitHub Actions / Node.js 16

Missing trailing comma.
},
});

Expand All @@ -45,6 +51,8 @@
url = `${url}/pulls`;
} else if (options.issues) {
url = `${url}/issues`;
}else if (options.openPullRequest) {

Check failure on line 54 in cli.js

View workflow job for this annotation

GitHub Actions / Node.js 16

Expected space(s) before "else".

Check failure on line 54 in cli.js

View workflow job for this annotation

GitHub Actions / Node.js 16

Expected space(s) before "else".
url = `${url}/compare/staging...${execSync('git rev-parse --abbrev-ref HEAD').toString().trim()}`;

Check failure on line 55 in cli.js

View workflow job for this annotation

GitHub Actions / Node.js 16

'execSync' is not defined.

Check failure on line 55 in cli.js

View workflow job for this annotation

GitHub Actions / Node.js 16

'execSync' is not defined.
}

return open(url);
Expand Down
Loading