Skip to content

Commit 7130ec9

Browse files
authored
feat: add --user and --repo options (#49)
1 parent 56112ea commit 7130ec9

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ But the comparison isn't quite as strict, generally leading to a shorter list of
4040
* `--filter-release`: Exclude Node-style release commits from the list. e.g. `Working on v1.0.0` or `2015-10-21 Version 2.0.0`.
4141
* `--reverse`: Reverse the results, this is especially useful when piping output to `xargs`.
4242
* `--commit-url`:A URL template which will be used to generate commit URLs for a repository not hosted in GitHub. `{ref}` is the placeholder that will be replaced with the commit, i.e. `--commit-url=https://gitlab.com/myUser/myRepo/commit/{ref}`. `{ghUser}` and `{ghRepo}` are available if they can be derived from package.json (Gitlab and Bitbucket URLs should be understood in package.json).
43+
* `--user`: Override the auto-detected GitHub user/org derived from package.json
44+
* `--repo`: Override the auto-detected GitHub repository name derived from package.json
4345

4446
## License
4547

branch-diff.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,14 @@ async function main () {
148148
requireLabels = requireLabels.concat(argv['require-label'])
149149
}
150150

151+
if (argv.user) {
152+
ghId.user = argv.user
153+
}
154+
155+
if (argv.repo) {
156+
ghId.repo = argv.repo
157+
}
158+
151159
const options = {
152160
group,
153161
excludeLabels,

0 commit comments

Comments
 (0)