Skip to content

API returns archive links for repo tags even if archives are disabled. #32159

Closed
@tobiasbp

Description

@tobiasbp

Description

In Gitea version 1.22.2, the API endpoint /repos/{owner}/{repo}/tags returns links in properties tarball_url & zipball_url even if archives has been disabled with DISABLE_DOWNLOAD_SOURCE_ARCHIVES.

I think the value should be the empty string, if downloading if archives is disabled. This would match the GUI, where the UI for downloading archives is removed.

This behavior might well be the same for other API endpoints containing links to downloadable archives.

I'd be happy to make a PR for this, if there is support for changing the current behavior.

Gitea Version

1.22.2

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Kubernetes

Database

PostgreSQL

Metadata

Metadata

Assignees

Labels

topic/apiConcerns mainly the APItype/proposalThe new feature has not been accepted yet but needs to be discussed first.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions