-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the feature
I have tried to implement a custom provider for Azure Devops. My code looks like this:
const devops: TemplateProvider = async (input, { auth }) => {
const match =
input.match(
/^(?<org>[\w.-]+)\/(?<proj>[\w. ]+)\/(?<repo>[\w.]+)(?<subdir>[^#]+)?(?<ref>#[\w./@-]+)?/,
)?.groups || {};
return {
name: "devops",
version: input,
headers: { authorization: Buffer.from(`:${auth}`).toString("base64") },
url: `https://dev.azure.com/${match.org}/${match.proj}/_git/${match.repo}?path=${match.subdir || "/"}&version=GB${match.ref ? match.ref.slice(1) : "main"}`,
tar: `https://dev.azure.com/${match.org}/${match.proj}/_apis/git/repositories/${match.repo}/items/items?path=${match.subdir || "/"}&versionDescriptor[version]=${match.ref ? match.ref.slice(1) : "main"}&resolveLfs=true&$format=zip&download=true`,
};
};
The problem is that Devops only allows a download as a zip file. So the download fails because a tar.gz file is expected.
It would be good if, for example, a separate unpacking callback function could be provided by the provider so that an alternative unpacking function can be used in this case.
Additional information
- Would you be willing to help implement this feature?
TechWatching
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request