-
Notifications
You must be signed in to change notification settings - Fork 171
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
feat(vcs): Correctly infer VCS settings when within a repo but not at the root #205
Conversation
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 feels like the entire monad
interface is very unwieldy in Go. It looks like this interface is only ever used for finding files or folders recursively in parents. What are your thoughts on removing package monad
, and specialising this functionality to package files
in a follow-on PR?
I'm also happy to pick up the monad
refactor.
cli.go
Outdated
// Package cli encompasses domain types for the CLI app. | ||
package cli | ||
|
||
// VCSType represents a type of version control system. |
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.
[nit] This can just be VCS
.
monad/monad.go
Outdated
Err error | ||
} | ||
|
||
// EitherVCSTypeFunc defines monadic EitherStr functions. |
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.
[nit] "defines monadic EitherVCSType functions".
vcs/vcs_test.go
Outdated
"github.com/fossas/fossa-cli/vcs" | ||
) | ||
|
||
func TestGetRepositoryBelowRoot(t *testing.T) { |
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.
Can you also add a test for being at the root?
Fixes #190.