Add metrics for completing/aborting a merge after conflicts#5810
Add metrics for completing/aborting a merge after conflicts#5810outofambit merged 28 commits intomasterfrom
Conversation
Co-Authored-By: William Shepherd <iamwillshepherd@users.noreply.github.com>
This is necessary because some non-standard git terminology was introduced. Add docs and clean up Lint
outofambit
left a comment
There was a problem hiding this comment.
thanks for taking this the last mile, @iAmWillShepherd! a few blocking requests.
how can we easily test that this works?
app/src/lib/stores/app-store.ts
Outdated
| const repoState = this.repositoryStateCache.get(repository) | ||
|
|
||
| // check if we're in a conflicted state | ||
| if (repoState.conflictState === null) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
app/src/lib/stats/stats-store.ts
Outdated
| mergedWithLoadingHintCount: 0, | ||
| mergedWithCleanMergeHintCount: 0, | ||
| mergedWithConflictWarningHintCount: 0, | ||
| mergeSuccesfulAfterConflicts: 0, |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
outofambit
left a comment
There was a problem hiding this comment.
tested this out locally and i think we're good 👍
| switch (command) { | ||
| case 'pull': | ||
| dispatcher.recordMergeConflictFromPull() | ||
| dispatcher.mergeConflictDetected() |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
app/src/lib/stores/app-store.ts
Outdated
| const repoState = this.repositoryStateCache.get(repository) | ||
|
|
||
| // check if we're in a conflicted state | ||
| if (repoState.conflictState === null) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
|
🍏 |
…tate Moves Conflict state into Changes state
|
🍏 |
shiftkey
left a comment
There was a problem hiding this comment.
Just a couple of suggestions
app/src/lib/stores/app-store.ts
Outdated
| const currentBranchName = status.currentBranch | ||
|
|
||
| // no current branch means something happened so bail | ||
| if (currentBranchName === undefined) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
app/src/lib/stores/app-store.ts
Outdated
| file.status === AppFileStatus.Resolved | ||
| ) | ||
|
|
||
| // we are still in a conflict, so bail |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
app/src/lib/stores/app-store.ts
Outdated
| return | ||
| } | ||
|
|
||
| // no more conflicts! |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
💯 |
shiftkey
left a comment
There was a problem hiding this comment.
One suggestion to cleanup, but I'll let @outofambit merge this at their leisure so we can wrap this up 🎉
| return | ||
| } | ||
|
|
||
| const repository = selection.repository |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
thanks @shiftkey! 🚀 going to merge this after tests pass so we can include this in the beta ✨ |
| return | ||
| } | ||
|
|
||
| const repository = selection.repository |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Fixes #5394
How to test
mergeAbortedAfterConflictsCountandmergeSuccessAfterConflictsCountfrom the database as n and m respectfully.Abort
git merge --abortmergeAbortedAfterConflictsCountshould be n + 1Complete
mergeSuccessAfterConflictsCountshould be m + 1