From 95be7f439d60b7657f38ebe12c5ff3b1c1db151f Mon Sep 17 00:00:00 2001 From: Risu <79110363+risu729@users.noreply.github.com> Date: Sun, 15 Dec 2024 22:52:28 +0900 Subject: [PATCH] feat: support pipx git hash syntax --- lib/modules/manager/mise/backends.ts | 6 +++--- lib/modules/manager/mise/index.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/modules/manager/mise/backends.ts b/lib/modules/manager/mise/backends.ts index c6080bb47c75ed..218b23cf2b72ae 100644 --- a/lib/modules/manager/mise/backends.ts +++ b/lib/modules/manager/mise/backends.ts @@ -122,11 +122,11 @@ export function createPipxToolConfig( let repoName: string | undefined; if (isGitSyntax) { repoName = pipxGitHubRegex.exec(name)?.groups?.repo; - // mise only supports specifying the version tag for github repos + // If the url is not a github repo, treat the version as a git ref if (is.undefined(repoName)) { return { - packageName: name, - skipReason: 'unsupported-url', + packageName: name.replace(/^git\+/, '').replaceAll(/\.git$/, ''), + datasource: GitRefsDatasource.id, }; } } else { diff --git a/lib/modules/manager/mise/index.ts b/lib/modules/manager/mise/index.ts index 8412ce32d534af..9534bbbe87dda2 100644 --- a/lib/modules/manager/mise/index.ts +++ b/lib/modules/manager/mise/index.ts @@ -35,7 +35,7 @@ const backendDatasources = { cargo: [CrateDatasource.id, GitTagsDatasource.id, GitRefsDatasource.id], go: [GoDatasource.id], npm: [NpmDatasource.id], - pipx: [PypiDatasource.id, GithubTagsDatasource.id], + pipx: [PypiDatasource.id, GithubTagsDatasource.id, GitRefsDatasource.id], spm: [GithubReleasesDatasource.id], ubi: [GithubReleasesDatasource.id], // not supported