-
Notifications
You must be signed in to change notification settings - Fork 9
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
add the option to choose which branch to test #151
base: main
Are you sure you want to change the base?
Conversation
bin/commands/result.js
Outdated
.option('branch', { | ||
desc: 'Branch that was chosen for testing', | ||
type: 'string', | ||
conflicts: 'config' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why would this conflict with config? Id expect the config to be overridden by command line flags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just following how the other options were programmed, although what you're saying makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems good overall
a1800a5
to
7d0e564
Compare
bin/commands/result.js
Outdated
@@ -18,7 +22,7 @@ exports.builder = (yargs) => yargs | |||
exports.handler = async (params) => { | |||
const config = params.dependent | |||
? { | |||
dependents: [{ repository: params.dependent }] | |||
dependents: [{ repository: params.dependent, branch: params?.branch || 'HEAD' }] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either params.dependent needs optional chaining, or params.branch doesn't
bin/commands/test.js
Outdated
@@ -24,7 +28,7 @@ exports.builder = (yargs) => yargs | |||
exports.handler = (params) => { | |||
const config = params.dependent | |||
? { | |||
dependents: [{ repository: params.dependent, pullRequest: !!params['pull-request'] }] | |||
dependents: [{ repository: params.dependent, pullRequest: !!params['pull-request'], branch: params?.branch || "HEAD" }] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either params.dependent and params['pull-request'] both need optional chaining, or params.branch doesn't
Optional chaining is not available for Node 12 :( |
but the pre-existing code also suggests it's not needed. maybe it's just IDE types that are wrong? |
7d0e564
to
30d1bb7
Compare
Probably |
d9e235a
to
715d9d5
Compare
I don't understand why it doesn't work for Node 12 now, there hasn't been any change that should break compatibility. |
try rebasing instead of merging and force push? |
I've found the error :) |
…arameter and replace package.json query
f0ecdf9
to
b870df3
Compare
8ae80a0
to
586c9e3
Compare
The option to choose which branch to use as a reference for testing is added, as the main branch will not always be the one selected.