-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Check for diffBranch existence before fetch files #115
Conversation
Thank you @WhiteYin for taking the time to make this change. It has been a long time pending item that I have skipped for months. I'm really glad that you made this change. |
} | ||
catch(err) { | ||
isdiffBranchExisted = checkForBranchExistence(baseBranch,remote); | ||
debug('Check whether branch is existed: ', diffBranch); |
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.
This PR is good to go with a success log stating that the base branch is existing.
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.
It would make the debugging process a bit easier.
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.
How about now? 😊
This PR is good to go with a success log stating that the base branch is existing.
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.
Cool 👍
I apologize for the delay in the reviewing this PR. |
} | ||
catch(err) { | ||
isdiffBranchExisted = checkForBranchExistence(baseBranch,remote); | ||
debug('Check whether branch is existed: ', diffBranch); |
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.
Cool 👍
@@ -107,6 +107,7 @@ if (process.stdout.isTTY) { | |||
|
|||
let committedGitFiles = []; | |||
if (isdiffBranchExisted) { | |||
log(success('Great, we find the ' + diffBranch + ' branch.')); |
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.
Unfortunately, I have merged this PR without noticing this line. I meant to add the log in debug mode. It's my fault that I didn't communicate well. I'm sorry for the inconvenience.
If you don't mind, could you raise another PR with a log message which prints only in debug mode?
If the base branch is found, you can put a log in debug mode. (something like Base branch exists
)
If not found, a warning log can be printed in normal mode. (something like below)
The base branch(branch_name) doesn't exist
Hence all the files will be considered
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.
Well,that's my fault.I will fix it later.
This PR introduces a check to see if the diffBranch is existed. If not, lint all tracked files instead of fetch from origin branch or baseBranch.
Closes #114