mirror of
https://github.com/go-gitea/gitea.git
synced 2024-08-24 21:34:36 -04:00
* Fixes #2738 - /git/tags API * proper URLs * Adds function comments * Updates swagger * Removes newline from tag message * Removes trailing newline from commit message * Adds integration test * Removed debugging * Adds tests * Fixes bug where multiple tags of same commit show wrong tag name * Fix formatting * Removes unused varaible * Fix to annotated tag function names and response * Update modules/git/repo_tag.go Co-Authored-By: Lauris BH <lauris@nix.lv> * Uses TagPrefix * Changes per review, better error handling for getting tag and commit IDs * Fix to getting commit ID * Fix to getting commit ID * Fix to getting commit ID * Fix to getting commit ID
33 lines
1.1 KiB
Go
33 lines
1.1 KiB
Go
// Copyright 2019 The Gitea Authors. All rights reserved.
|
|
// Use of this source code is governed by a MIT-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package structs
|
|
|
|
// Tag represents a repository tag
|
|
type Tag struct {
|
|
Name string `json:"name"`
|
|
ID string `json:"id"`
|
|
Commit *CommitMeta `json:"commit"`
|
|
ZipballURL string `json:"zipball_url"`
|
|
TarballURL string `json:"tarball_url"`
|
|
}
|
|
|
|
// AnnotatedTag represents an annotated tag
|
|
type AnnotatedTag struct {
|
|
Tag string `json:"tag"`
|
|
SHA string `json:"sha"`
|
|
URL string `json:"url"`
|
|
Message string `json:"message"`
|
|
Tagger *CommitUser `json:"tagger"`
|
|
Object *AnnotatedTagObject `json:"object"`
|
|
Verification *PayloadCommitVerification `json:"verification"`
|
|
}
|
|
|
|
// AnnotatedTagObject contains meta information of the tag object
|
|
type AnnotatedTagObject struct {
|
|
Type string `json:"type"`
|
|
URL string `json:"url"`
|
|
SHA string `json:"sha"`
|
|
}
|