mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00: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
This commit is contained in:
@@ -2036,6 +2036,46 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/git/tags/{sha}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"repository"
|
||||
],
|
||||
"summary": "Gets the tag of a repository.",
|
||||
"operationId": "GetTag",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "owner of the repo",
|
||||
"name": "owner",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "name of the repo",
|
||||
"name": "repo",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "sha of the tag",
|
||||
"name": "sha",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/AnnotatedTag"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/repos/{owner}/{repo}/git/trees/{sha}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
@@ -6762,6 +6802,57 @@
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"AnnotatedTag": {
|
||||
"description": "AnnotatedTag represents an annotated tag",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string",
|
||||
"x-go-name": "Message"
|
||||
},
|
||||
"object": {
|
||||
"$ref": "#/definitions/AnnotatedTagObject"
|
||||
},
|
||||
"sha": {
|
||||
"type": "string",
|
||||
"x-go-name": "SHA"
|
||||
},
|
||||
"tag": {
|
||||
"type": "string",
|
||||
"x-go-name": "Tag"
|
||||
},
|
||||
"tagger": {
|
||||
"$ref": "#/definitions/CommitUser"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"x-go-name": "URL"
|
||||
},
|
||||
"verification": {
|
||||
"$ref": "#/definitions/PayloadCommitVerification"
|
||||
}
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"AnnotatedTagObject": {
|
||||
"description": "AnnotatedTagObject contains meta information of the tag object",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sha": {
|
||||
"type": "string",
|
||||
"x-go-name": "SHA"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"x-go-name": "Type"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"x-go-name": "URL"
|
||||
}
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"Attachment": {
|
||||
"description": "Attachment a generic attachment",
|
||||
"type": "object",
|
||||
@@ -9458,18 +9549,11 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"commit": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sha": {
|
||||
"type": "string",
|
||||
"x-go-name": "SHA"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"x-go-name": "URL"
|
||||
}
|
||||
},
|
||||
"x-go-name": "Commit"
|
||||
"$ref": "#/definitions/CommitMeta"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"x-go-name": "ID"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
@@ -9735,6 +9819,12 @@
|
||||
"AccessTokenList": {
|
||||
"description": "AccessTokenList represents a list of API access token."
|
||||
},
|
||||
"AnnotatedTag": {
|
||||
"description": "AnnotatedTag",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/AnnotatedTag"
|
||||
}
|
||||
},
|
||||
"Attachment": {
|
||||
"description": "Attachment",
|
||||
"schema": {
|
||||
@@ -10056,6 +10146,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Tag": {
|
||||
"description": "Tag",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Tag"
|
||||
}
|
||||
},
|
||||
"TagList": {
|
||||
"description": "TagList",
|
||||
"schema": {
|
||||
|
Reference in New Issue
Block a user