From 77afb48ab09bb5bc4752c7cd074169cbcc322d85 Mon Sep 17 00:00:00 2001 From: Zettat123 Date: Mon, 3 Apr 2023 11:58:41 +0800 Subject: [PATCH 1/2] disable edit tags --- templates/repo/release/list.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index 3dc3deb3954c7..94acb266f595b 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -93,7 +93,7 @@ {{end}}
- {{if $.CanCreateRelease}} + {{if and $.CanCreateRelease (not .IsTag)}} {{svg "octicon-pencil"}} From 8afcf7e1bb17ca398054e538dfa7aa548c404cf2 Mon Sep 17 00:00:00 2001 From: Zettat123 Date: Mon, 3 Apr 2023 13:47:24 +0800 Subject: [PATCH 2/2] update comment --- models/repo/release.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/repo/release.go b/models/repo/release.go index f7b24044b9c2c..c8dd7fbc7a368 100644 --- a/models/repo/release.go +++ b/models/repo/release.go @@ -79,7 +79,7 @@ type Release struct { RenderedNote string `xorm:"-"` IsDraft bool `xorm:"NOT NULL DEFAULT false"` IsPrerelease bool `xorm:"NOT NULL DEFAULT false"` - IsTag bool `xorm:"NOT NULL DEFAULT false"` + IsTag bool `xorm:"NOT NULL DEFAULT false"` // will be true only if the record is a tag and has no related releases Attachments []*Attachment `xorm:"-"` CreatedUnix timeutil.TimeStamp `xorm:"INDEX"` }