-
Notifications
You must be signed in to change notification settings - Fork 333
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
Improve GitLab API finder error handling #569
Conversation
@@ -37,7 +37,7 @@ class Gitlab { | |||
} | |||
|
|||
async repoBase() { | |||
if (this._detected_base) return this._detected_base; | |||
if (this.detectedBase) return this.detectedBase; |
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.
could still keep the underscore prefix though if the intention was to be a private var.
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.
More conventional than anything else
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.
The most idiomatic alternative would be using a private field, but that's just a proposal.
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.
We use that variable to memoi*e the function result, so it can be considered private.
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 does not have to be private either but should be exposed in other drivers for consisitency, being very purist we should do a closure of request here with the detectedbase... not needed IMHO
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.
Using a closure sounds tempting, but would add a considerable maintenance overhead and nobody cares about our internal API, yet. 😅 Let's leave it be for now.
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.
@casperdcl, what do you think?
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.
yes not really massive priority to do this at enterprise level yet, fine as-is
@@ -37,7 +37,7 @@ class Gitlab { | |||
} | |||
|
|||
async repoBase() { | |||
if (this._detected_base) return this._detected_base; | |||
if (this.detectedBase) return this.detectedBase; |
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.
yes not really massive priority to do this at enterprise level yet, fine as-is
Closes #472, related to #563