Contracts

Defines the message schemas used for inter-service communication over RabbitMQ via Wolverine.

Message Parity and Per-Producer Contracts

MILTON avoids a shared global contracts assembly. Instead, the Git Operations worker declares its own structurally-identical copy of the API’s messages. This guarantees service autonomy. The binding at the wire level is achieved via the [MessageIdentity("clone-repositories")] attribute on CloneRepositoriesCommand.

The Models

CloneRepositoriesCommand

The inbound trigger message. Contains the TenantId, ProjectId, and a collection of CloneRepositoryRequest objects. The API publishes this command whenever a project’s repository configuration is updated.

CloneRepositoryRequest

Defines the instructions for a single repository:

  • RepositoryUrl: The target Git URI.
  • GitToken: Optional OAuth2 token used by LibGit2Sharp for authentication.
  • FileExclusions: Patterns passed down to the S3 upload to prevent unnecessary files (e.g., node_modules, binaries) from being stored in the platform.

GitCloneResult

The specific outcome of an individual repository clone attempt. Tracks the final LocalPath, exact RepositoryName, and Success status. If an exception is caught during clone, ErrorMessage is populated.

CloneRepositoriesResult

An aggregated result summarizing the entire clone batch. It calculates TotalRepositories, SuccessfulClones, and FailedClones alongside the detailed results.

0 items under this folder.