Skip to content

Azure DevOps support for deps import #44

Description

@gosharplite

I've implemented Azure DevOps support for modelith deps import on a fork branch:

https://github.com/gosharplite/modelith/tree/feat/ado-deps-import

It follows the same "no TLS in modelith" pattern — all network calls go through az rest via the Runner interface. No HTTP client or credential handling in modelith itself.

What's there:

  • ParseSource accepts dev.azure.com blob URLs:
    https://dev.azure.com/{org}/{project}/_git/{repo}?path=...&version=GB{branch}
  • GB/GT/GC version prefixes mapped to branch/tag/commit in the API calls
  • --resource 499b84ac-1321-427f-aa17-267ca6975798 passed to az rest so it gets an AAD token with the correct audience
  • Source.Project field added (empty for GitHub)
  • ExecRunner.Run shows correct install instructions per CLI (az login vs gh auth login)
  • 14 new tests, all CI checks passing

Usage:

az login
modelith deps import \
  "https://dev.azure.com/myorg/myproject/_git/myrepo?path=docs/payments.modelith.yaml&version=GBmain"

I don't have much experience with upstream PRs in open-source world — feel free to reference, adapt, or take anything useful from the branch. If a PR would be helpful I'm happy to open one with some guidance.

The full commit history and an earlier review thread are at gosharplite#1.

p.s. I find modelith extremely useful and use it on my agent tool and several Azure DevOps repos: https://github.com/gosharplite/tell-me-go/tree/main/docs/domain-model#how-modelith-helps-tell-me-go

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions