-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Show an error if auth type is incorrect #71
Comments
Would the solution be to call Edit: That would not work as that would be an import cycle |
I think a good approach would be to make a function like this (taken from here):
This function should be in the same file as the enum declarations to avoid someone creating a new enum in the future without upgrading this func. Using |
Where is the config.Validate function? I could not find it. |
Line 145 in ce4a242
|
sorry, I didn't know of this convention, fileName.functionName and it is so logical. |
Closed by #84 |
… code into separate components (#81) * refactored issue tracker component, applying dependency inversion * fix failing build for tests * renamed all occurrencces of redmine to pivotaltracker in the pivotaltracker component * fix issue #71 (#84) Co-authored-by: zen <zen@zen> * unblock issues caused by bad validation (#85) * unblock issues caused by bad validation * remove commented out code * Enable annotating issues with hashtag (#86) * Enable annotating github issues with hashtag * add test * revert ParseGithubDetails to parseGithubDetails * revert README and auto_detect_config's change * Add test for hashtag todos with github * Add ExpectJSONOutput (#77) * Add ExpectJSONOutput * rename ExpectJsonOutput to WithJSONOutput, divide validateTodoErrs into two funcs * modify the way to compare json todo errs and scenarios * Add TestAnnotatedTodosWithJSONOutput Co-authored-by: Preslav Mihaylov <preslav@uber.com> * re-fixes issue #71 broken by PR #85 (#87) * re-fixes issue #71 broken by PR #85 * re-fixes issue #71, removes validation of auth type from validation.go Co-authored-by: zen <zen@zen> Co-authored-by: Preslav Mihaylov <preslav@uber.com> * refactored issue tracker component, applying dependency inversion Co-authored-by: zen37 <mobi2009ro@gmail.com> Co-authored-by: zen <zen@zen> Co-authored-by: liao <liao_shizhen@yahoo.co.jp>
Here's the error I get when the provided auth type in
.todocheck.yaml
is incorrect:This happens because there is a check for it in one of the components using the config. It would be more appropriate to validate against this in the
config.Validate
function instead and show an error message to the user in a normal fashion, rather than relying on a panic, which happens afterwards.The text was updated successfully, but these errors were encountered: