mirror of
https://github.com/Mic92/nix-update.git
synced 2024-09-11 02:25:32 +03:00
remove broken Gogs/notabug.com support
Gogs isn't Gitea. The API surface of Gogs is different from Gitea's. Additionally, notabug.com uses a multiple years old version of Gogs, which has neither `/tags` nor `/commits` implemented. The implementation we use in `version/gitea.py` simple does not work. You can check this yourself by running `nix-update libgtkflow4`, one of the few packages in nixpkgs that are hosted on notabug.com
This commit is contained in:
parent
5a5f48412d
commit
e948a7f797
@ -11,7 +11,6 @@ designed to work with nixpkgs but also other package sets.
|
||||
- Gitea
|
||||
- GitHub
|
||||
- GitLab
|
||||
- NotABug.org
|
||||
- PyPi
|
||||
- RubyGems.org
|
||||
- Sourcehut
|
||||
|
@ -323,7 +323,7 @@ def update_version(
|
||||
elif package.parsed_url.netloc == "github.com":
|
||||
_, owner, repo, *_ = package.parsed_url.path.split("/")
|
||||
package.diff_url = f"https://github.com/{owner}/{repo.removesuffix('.git')}/compare/{package.rev}...{new_version.rev or new_version.number}"
|
||||
elif package.parsed_url.netloc in ["codeberg.org", "gitea.com", "notabug.org"]:
|
||||
elif package.parsed_url.netloc in ["codeberg.org", "gitea.com"]:
|
||||
_, owner, repo, *_ = package.parsed_url.path.split("/")
|
||||
package.diff_url = f"https://{package.parsed_url.netloc}/{owner}/{repo}/compare/{package.rev}...{new_version.rev or new_version.number}"
|
||||
elif GITLAB_API.match(package.parsed_url.geturl()) and package.src_homepage:
|
||||
|
@ -133,5 +133,5 @@ def fetch_latest_version(
|
||||
)
|
||||
|
||||
raise VersionError(
|
||||
"Please specify the version. We can only get the latest version from codeberg/crates.io/gitea/github/gitlab/notabug/pypi/savannah/sourcehut/rubygems projects right now"
|
||||
"Please specify the version. We can only get the latest version from codeberg/crates.io/gitea/github/gitlab/pypi/savannah/sourcehut/rubygems projects right now"
|
||||
)
|
||||
|
@ -6,7 +6,7 @@ from .version import Version
|
||||
|
||||
|
||||
def fetch_gitea_versions(url: ParseResult) -> list[Version]:
|
||||
if url.netloc not in ["codeberg.org", "gitea.com", "notabug.org"]:
|
||||
if url.netloc not in ["codeberg.org", "gitea.com"]:
|
||||
return []
|
||||
|
||||
_, owner, repo, *_ = url.path.split("/")
|
||||
@ -17,7 +17,7 @@ def fetch_gitea_versions(url: ParseResult) -> list[Version]:
|
||||
|
||||
|
||||
def fetch_gitea_snapshots(url: ParseResult, branch: str) -> list[Version]:
|
||||
if url.netloc not in ["codeberg.org", "gitea.com", "notabug.org"]:
|
||||
if url.netloc not in ["codeberg.org", "gitea.com"]:
|
||||
return []
|
||||
|
||||
_, owner, repo, *_ = url.path.split("/")
|
||||
|
Loading…
Reference in New Issue
Block a user