0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-04 07:55:31 +02:00

fix artifact download endpoint urls

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-11-23 20:42:24 -05:00
parent ca46f0ebb2
commit c63f7096c2
No known key found for this signature in database
GPG Key ID: 924A5F6AF051E87C

View File

@ -1778,7 +1778,11 @@ func buildSignature(endp string, expires, artifactID int64) []byte {
}
func buildDownloadRawEndpoint(repo *repo_model.Repository, artifactID int64) string {
return fmt.Sprintf("api/v1/repos/%s/%d/%s/actions/artifacts/%d/zip/raw", url.PathEscape(repo.OwnerName), repo.GroupID, url.PathEscape(repo.Name), artifactID)
var groupSegment string
if repo.GroupID > 0 {
groupSegment = fmt.Sprintf("%d/", repo.GroupID)
}
return fmt.Sprintf("api/v1/repos/%s/%s%s/actions/artifacts/%d/zip/raw", url.PathEscape(repo.OwnerName), groupSegment, url.PathEscape(repo.Name), artifactID)
}
func buildSigURL(ctx go_context.Context, endPoint string, artifactID int64) string {