Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Centralize git operation side effects - #1230

Merged
kuychaco merged 73 commits into
masterfrom
ku-centralize-git-operation-side-effects
Dec 6, 2017
Merged

kuychaco merged 73 commits into
masterfrom
ku-centralize-git-operation-side-effects

Conversation

@kuychaco

@kuychaco kuychaco commented Oct 24, 2017 •

Copy link
Copy Markdown
Contributor

The purpose of this PR is to centralize all of the side effects associated with git operations, such as error-handling, showing notifications, prompting, and setting progress state. Previously this logic resided in controllers and views which coupled the side effect to a particular piece of the UI. This refactor ensures that a "push" will do the same thing regardless of whether it's triggered from the PushPullMenuView or from the GitHub panel as part of creating a PR.

The implementation includes the creation of an ActionPipeline for each git operation (push, pull, fetch, commit, checkout) followed by middleware registration for each side effect ('confirm-force-push', 'set-push-in-progress', etc). The pipelines are passed to the Repository, which executes the pipeline actions associated with each git operation.

Relies on atom/atom#16294
Supersedes some of the work in #1138

TODO:

  • in progress spinner doesn't stop after error message appears
  • 🔥 ModelStateRegistry and move amending/commit message state to repo
  • fix flicker when checking out existing branch (takes time or currentBranch to update)
  • add progress indicator for checkout
  • operationStates is not defaulting to empty object (set as defaultProp in the meantime)
  • convert remote interactions
  • convert checkout
  • convert commit
  • extract pipeline setup from GithubPackage
  • extract action to set in-progress state

Loading
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants