Skip to content
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

Merged
merged 9 commits into from
Aug 1, 2018

Conversation

delikat
Copy link
Contributor

@delikat delikat commented Jul 31, 2018

Fixes #190.

@delikat delikat requested a review from elldritch July 31, 2018 23:16
Copy link
Member

@elldritch elldritch left a 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.
Copy link
Member

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.
Copy link
Member

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) {
Copy link
Member

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?

@elldritch elldritch merged commit dbabe3e into master Aug 1, 2018
@delikat delikat deleted the feat/190-infer-vcs-settings branch August 1, 2018 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants