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

Expose services for other packages to consume #1089

Open
@smashwilson

Description

@smashwilson

This has been in my head for quite some time, but I just realized that I never actually filed the issue to capture it. To quote myself from the past:

For this package I personally prefer to keep our vocabulary as close to git's as possible, partially because one of my goals for it is for it to act as a tool for gently teaching git novices git concepts. The sync button is super handy, but it also conceals the operations it performs behind an abstraction that doesn't exist in other clients or on the command-line. If a developer first encounters git with this package, but is able to follow instructions written for general git users in an open-source project's contributing guide, I'll be very happy.

Part of my Evil Plan ™️ for this package is to expose a variety of services that other packages can consume to overlay higher-level workflows on top of the basic operations provided directly. For example, you could install a package that adds useful commands and controls for GitHub flow, a different one for git flow, or even something homegrown for whatever bespoke git branching models are used in some internal project. To me, that's where compound actions like "sync" would live.

I can see several "layers" of services which would be useful to provide:

  1. Raw git operations. Allow other packages to execute arbitrary git commands by re-exporting our git process machinery. This will allow other packages to participate in our async queue and avoid all of the concurrency and performance gotchas that we've squashed over time.
  2. Hooks into GitHub package features. For example, it would be neat to be able to interpose your own package's conflict resolution tooling or diff view.
  3. High-level workflow operations. I'm picturing a service function per registry command as a rough target. This would enable packages to succinctly express workflow-level integrations without having to re-invent the wheel in terms of the best git porcelain for the "primitives".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions