Skip to content

Commit

Permalink
feat: add --user and --repo options (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
bengl authored Sep 1, 2022
1 parent 56112ea commit 7130ec9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ But the comparison isn't quite as strict, generally leading to a shorter list of
* `--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`.
* `--reverse`: Reverse the results, this is especially useful when piping output to `xargs`.
* `--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).
* `--user`: Override the auto-detected GitHub user/org derived from package.json
* `--repo`: Override the auto-detected GitHub repository name derived from package.json

## License

Expand Down
8 changes: 8 additions & 0 deletions branch-diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@ async function main () {
requireLabels = requireLabels.concat(argv['require-label'])
}

if (argv.user) {
ghId.user = argv.user
}

if (argv.repo) {
ghId.repo = argv.repo
}

const options = {
group,
excludeLabels,
Expand Down

0 comments on commit 7130ec9

Please sign in to comment.