Azure DevOps backend: skeleton #49
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #23. After #48 is merged.
Goal
An Azure DevOps backend that authenticates and reads the repository. Pull request operations follow in later issues.
Required facts
ForgeForgejo,ForgeGitHub);backends.New(internal/forge/backends/backends.go:17) has one case per type.base_url(https://dev.azure.com/<org>);-repois<project>/<repo>(Owner= project,Name= repository).forge.RepoandParseRepodo not change.FACTORY_FORGE_TOKENholds the already base64-encoded credential.GitAuthorization(token)returns"Basic " + token; the API client sends the same header and encodes nothing.forgetest.Run(internal/forge/forgetest/forgetest.go:115) tests issue operations (from :143); a backend without issues must be able to skip them.Changes
config.ForgeAzureDevOps = "azuredevops"and its case inbackends.New.internal/forge/azuredevops:Whoami,GetRepo,GetPermission,GitAuthorization.GetIssue,ListIssues,SetLabels: error "not supported on Azure DevOps, use a tracker".Forgemethods: error "not supported yet".forgetest: a capability for backends without issues (their issue tests are skipped), and a way to skip groups not implemented yet.Tests
forgetest.Runagainst anhttptestfake, issue tests and unimplemented groups skipped.Basicheader and the error messages.Docs (same pull request)
docs/using-the-factory.md: Azure setup including the token encoding;factory.example.json.Done criteria
just checkpasses.