Repository navigation
extract logic from inside Commit class - #6100
Merged
Merged
Conversation
1 task done
Member
Author
|
Marking this as |
outofambit
self-requested a review
November 13, 2018 21:41
niik
requested changes
Nov 14, 2018
niik
left a comment
Member
There was a problem hiding this comment.
I'm 👍 on moving the isWebFlowCommitter out of the class itself but commit-identity is already an established concept within the app. Could we find another place for the function to live? Perhaps as another static method on the already existing CommitIdentity class, perhaps we just rename the file to is-web-flow-committer.ts or we let it live in the same file as the commit model like extractCoAuthors except we export it.
Member
Author
@niik 👍 I'll rename the file to avoid clashing with commit identity |
Member
Author
|
🍎 |
niik
approved these changes
Nov 14, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
While investigating #6085 I needed to create a tree of objects as part of a test
Tip -> Branch -> Commit, and I had to stub a function namedisWebFlowCommitterto match the instance function already defined onCommit.This felt wrong for a few reasons:
isWebFlowCommiterdoesn't update any state onCommitisWebFlowCommitteronly needs to read public fields onCommit() => falsewhich just adds noiseThis feels to me like a great situation where it can just be a function!
Description
This PR moves
isWebFlowCommitterout toapp/src/lib/commit-identity.tsand updates the usage to call that function.Release notes
Notes: no-notes