Create tag on ui (#13467)

Support create single tag directly

support create tag with message from create release ui

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
a1012112796 2021-03-01 03:57:45 +08:00 committed by GitHub
parent 3e652860bb
commit 83cf1a894e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 149 additions and 29 deletions

View file

@ -16,6 +16,7 @@ import (
// NewBranchForm form for creating a new branch
type NewBranchForm struct {
NewBranchName string `binding:"Required;MaxSize(100);GitRefName"`
CreateTag bool
}
// Validate validates the fields

View file

@ -642,7 +642,9 @@ type NewReleaseForm struct {
Title string `binding:"Required;MaxSize(255)"`
Content string
Draft string
TagOnly string
Prerelease bool
AddTagMsg bool
Files []string
}

View file

@ -43,7 +43,7 @@ func TestRepository_GetTag(t *testing.T) {
aTagCommitID := "8006ff9adbf0cb94da7dad9e537e53817f9fa5c0"
aTagName := "annotatedTag"
aTagMessage := "my annotated message"
aTagMessage := "my annotated message \n - test two line"
bareRepo1.CreateAnnotatedTag(aTagName, aTagMessage, aTagCommitID)
aTagID, _ := bareRepo1.GetTagID(aTagName)