mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-19 00:01:16 -04:00
Compare commits
No commits in common. "da0467e3b658b7105fec48c71cc64be4410ffce5" and "a101dbaa7952e359843c6d8303ca24a0e63c865c" have entirely different histories.
da0467e3b6
...
a101dbaa79
@ -44,10 +44,7 @@ steps:
|
|||||||
image: techknowlogick/xgo:go-1.21.x
|
image: techknowlogick/xgo:go-1.21.x
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
- apt-get update && apt-get -qqy install ca-certificates curl gnupg
|
- curl -sL https://deb.nodesource.com/setup_20.x | bash - && apt-get -qqy install nodejs
|
||||||
- mkdir -p /etc/apt/keyrings && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
|
||||||
- echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" > /etc/apt/sources.list.d/nodesource.list
|
|
||||||
- apt-get update && apt-get -qqy install nodejs
|
|
||||||
- export PATH=$PATH:$GOPATH/bin
|
- export PATH=$PATH:$GOPATH/bin
|
||||||
- make release
|
- make release
|
||||||
environment:
|
environment:
|
||||||
|
2
go.mod
2
go.mod
@ -42,7 +42,7 @@ require (
|
|||||||
github.com/go-chi/chi/v5 v5.0.10
|
github.com/go-chi/chi/v5 v5.0.10
|
||||||
github.com/go-chi/cors v1.2.1
|
github.com/go-chi/cors v1.2.1
|
||||||
github.com/go-co-op/gocron v1.31.1
|
github.com/go-co-op/gocron v1.31.1
|
||||||
github.com/go-enry/go-enry/v2 v2.8.5
|
github.com/go-enry/go-enry/v2 v2.8.4
|
||||||
github.com/go-fed/httpsig v1.1.1-0.20201223112313-55836744818e
|
github.com/go-fed/httpsig v1.1.1-0.20201223112313-55836744818e
|
||||||
github.com/go-git/go-billy/v5 v5.4.1
|
github.com/go-git/go-billy/v5 v5.4.1
|
||||||
github.com/go-git/go-git/v5 v5.8.1
|
github.com/go-git/go-git/v5 v5.8.1
|
||||||
|
4
go.sum
4
go.sum
@ -347,8 +347,8 @@ github.com/go-chi/cors v1.2.1 h1:xEC8UT3Rlp2QuWNEr4Fs/c2EAGVKBwy/1vHx3bppil4=
|
|||||||
github.com/go-chi/cors v1.2.1/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58=
|
github.com/go-chi/cors v1.2.1/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58=
|
||||||
github.com/go-co-op/gocron v1.31.1 h1:LZAuBlU0t3SPGUMJGhrJ6VuCc3CsrYzkzicygvVWlfA=
|
github.com/go-co-op/gocron v1.31.1 h1:LZAuBlU0t3SPGUMJGhrJ6VuCc3CsrYzkzicygvVWlfA=
|
||||||
github.com/go-co-op/gocron v1.31.1/go.mod h1:39f6KNSGVOU1LO/ZOoZfcSxwlsJDQOKSu8erN0SH48Y=
|
github.com/go-co-op/gocron v1.31.1/go.mod h1:39f6KNSGVOU1LO/ZOoZfcSxwlsJDQOKSu8erN0SH48Y=
|
||||||
github.com/go-enry/go-enry/v2 v2.8.5 h1:jtYXblst2+d9k7ZgEgkv6Q5hKRKPf0qHRjt715BZEX4=
|
github.com/go-enry/go-enry/v2 v2.8.4 h1:QrY3hx/RiqCJJRbdU0MOcjfTM1a586J0WSooqdlJIhs=
|
||||||
github.com/go-enry/go-enry/v2 v2.8.5/go.mod h1:9yrj4ES1YrbNb1Wb7/PWYr2bpaCXUGRt0uafN0ISyG8=
|
github.com/go-enry/go-enry/v2 v2.8.4/go.mod h1:9yrj4ES1YrbNb1Wb7/PWYr2bpaCXUGRt0uafN0ISyG8=
|
||||||
github.com/go-enry/go-oniguruma v1.2.1 h1:k8aAMuJfMrqm/56SG2lV9Cfti6tC4x8673aHCcBk+eo=
|
github.com/go-enry/go-oniguruma v1.2.1 h1:k8aAMuJfMrqm/56SG2lV9Cfti6tC4x8673aHCcBk+eo=
|
||||||
github.com/go-enry/go-oniguruma v1.2.1/go.mod h1:bWDhYP+S6xZQgiRL7wlTScFYBe023B6ilRZbCAD5Hf4=
|
github.com/go-enry/go-oniguruma v1.2.1/go.mod h1:bWDhYP+S6xZQgiRL7wlTScFYBe023B6ilRZbCAD5Hf4=
|
||||||
github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw=
|
github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw=
|
||||||
|
@ -342,7 +342,7 @@ func (stats *ActivityStats) FillReleases(ctx context.Context, repoID int64, from
|
|||||||
|
|
||||||
// Published releases list
|
// Published releases list
|
||||||
sess := releasesForActivityStatement(ctx, repoID, fromTime)
|
sess := releasesForActivityStatement(ctx, repoID, fromTime)
|
||||||
sess.OrderBy("`release`.created_unix DESC")
|
sess.OrderBy("release.created_unix DESC")
|
||||||
stats.PublishedReleases = make([]*repo_model.Release, 0)
|
stats.PublishedReleases = make([]*repo_model.Release, 0)
|
||||||
if err = sess.Find(&stats.PublishedReleases); err != nil {
|
if err = sess.Find(&stats.PublishedReleases); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -350,7 +350,7 @@ func (stats *ActivityStats) FillReleases(ctx context.Context, repoID int64, from
|
|||||||
|
|
||||||
// Published releases authors
|
// Published releases authors
|
||||||
sess = releasesForActivityStatement(ctx, repoID, fromTime)
|
sess = releasesForActivityStatement(ctx, repoID, fromTime)
|
||||||
if _, err = sess.Select("count(distinct `release`.publisher_id) as `count`").Table("release").Get(&count); err != nil {
|
if _, err = sess.Select("count(distinct release.publisher_id) as `count`").Table("release").Get(&count); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
stats.PublishedReleaseAuthorCount = count
|
stats.PublishedReleaseAuthorCount = count
|
||||||
@ -359,7 +359,7 @@ func (stats *ActivityStats) FillReleases(ctx context.Context, repoID int64, from
|
|||||||
}
|
}
|
||||||
|
|
||||||
func releasesForActivityStatement(ctx context.Context, repoID int64, fromTime time.Time) *xorm.Session {
|
func releasesForActivityStatement(ctx context.Context, repoID int64, fromTime time.Time) *xorm.Session {
|
||||||
return db.GetEngine(ctx).Where("`release`.repo_id = ?", repoID).
|
return db.GetEngine(ctx).Where("release.repo_id = ?", repoID).
|
||||||
And("`release`.is_draft = ?", false).
|
And("release.is_draft = ?", false).
|
||||||
And("`release`.created_unix >= ?", fromTime.Unix())
|
And("release.created_unix >= ?", fromTime.Unix())
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ func checkDBConsistency(ctx context.Context, logger log.Logger, autofix bool) er
|
|||||||
},
|
},
|
||||||
// find releases without existing repository
|
// find releases without existing repository
|
||||||
genericOrphanCheck("Orphaned Releases without existing repository",
|
genericOrphanCheck("Orphaned Releases without existing repository",
|
||||||
"release", "repository", "`release`.repo_id=repository.id"),
|
"release", "repository", "release.repo_id=repository.id"),
|
||||||
// find pulls without existing issues
|
// find pulls without existing issues
|
||||||
genericOrphanCheck("Orphaned PullRequests without existing issue",
|
genericOrphanCheck("Orphaned PullRequests without existing issue",
|
||||||
"pull_request", "issue", "pull_request.issue_id=issue.id"),
|
"pull_request", "issue", "pull_request.issue_id=issue.id"),
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
package structs
|
package structs
|
||||||
|
|
||||||
import "time"
|
|
||||||
|
|
||||||
// CreatePushMirrorOption represents need information to create a push mirror of a repository.
|
// CreatePushMirrorOption represents need information to create a push mirror of a repository.
|
||||||
type CreatePushMirrorOption struct {
|
type CreatePushMirrorOption struct {
|
||||||
RemoteAddress string `json:"remote_address"`
|
RemoteAddress string `json:"remote_address"`
|
||||||
@ -17,14 +15,12 @@ type CreatePushMirrorOption struct {
|
|||||||
// PushMirror represents information of a push mirror
|
// PushMirror represents information of a push mirror
|
||||||
// swagger:model
|
// swagger:model
|
||||||
type PushMirror struct {
|
type PushMirror struct {
|
||||||
RepoName string `json:"repo_name"`
|
RepoName string `json:"repo_name"`
|
||||||
RemoteName string `json:"remote_name"`
|
RemoteName string `json:"remote_name"`
|
||||||
RemoteAddress string `json:"remote_address"`
|
RemoteAddress string `json:"remote_address"`
|
||||||
// swagger:strfmt date-time
|
CreatedUnix string `json:"created"`
|
||||||
CreatedUnix time.Time `json:"created"`
|
LastUpdateUnix string `json:"last_update"`
|
||||||
// swagger:strfmt date-time
|
LastError string `json:"last_error"`
|
||||||
LastUpdateUnix *time.Time `json:"last_update"`
|
Interval string `json:"interval"`
|
||||||
LastError string `json:"last_error"`
|
SyncOnCommit bool `json:"sync_on_commit"`
|
||||||
Interval string `json:"interval"`
|
|
||||||
SyncOnCommit bool `json:"sync_on_commit"`
|
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,8 @@ func ToPushMirror(pm *repo_model.PushMirror) (*api.PushMirror, error) {
|
|||||||
RepoName: repo.Name,
|
RepoName: repo.Name,
|
||||||
RemoteName: pm.RemoteName,
|
RemoteName: pm.RemoteName,
|
||||||
RemoteAddress: pm.RemoteAddress,
|
RemoteAddress: pm.RemoteAddress,
|
||||||
CreatedUnix: pm.CreatedUnix.AsTime(),
|
CreatedUnix: pm.CreatedUnix.FormatLong(),
|
||||||
LastUpdateUnix: pm.LastUpdateUnix.AsTimePtr(),
|
LastUpdateUnix: pm.LastUpdateUnix.FormatLong(),
|
||||||
LastError: pm.LastError,
|
LastError: pm.LastError,
|
||||||
Interval: pm.Interval.String(),
|
Interval: pm.Interval.String(),
|
||||||
SyncOnCommit: pm.SyncOnCommit,
|
SyncOnCommit: pm.SyncOnCommit,
|
||||||
|
@ -3,5 +3,5 @@
|
|||||||
id="label_{{.label.ID}}"
|
id="label_{{.label.ID}}"
|
||||||
href="{{.root.RepoLink}}/{{if or .root.IsPull .root.Issue.IsPull}}pulls{{else}}issues{{end}}?labels={{.label.ID}}"{{/* FIXME: use .root.Issue.Link or create .root.Link */}}
|
href="{{.root.RepoLink}}/{{if or .root.IsPull .root.Issue.IsPull}}pulls{{else}}issues{{end}}?labels={{.label.ID}}"{{/* FIXME: use .root.Issue.Link or create .root.Link */}}
|
||||||
>
|
>
|
||||||
{{- RenderLabel $.Context .label -}}
|
{{RenderLabel $.Context .label}}
|
||||||
</a>
|
</a>
|
||||||
|
@ -47,8 +47,8 @@
|
|||||||
{{template "repo/issue/view_content/show_role" dict "ShowRole" .Issue.ShowRole "IgnorePoster" true}}
|
{{template "repo/issue/view_content/show_role" dict "ShowRole" .Issue.ShowRole "IgnorePoster" true}}
|
||||||
{{if not $.Repository.IsArchived}}
|
{{if not $.Repository.IsArchived}}
|
||||||
{{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index)}}
|
{{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index)}}
|
||||||
|
{{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" .Issue "delete" false "issue" true "diff" false "IsCommentPoster" $.IsIssuePoster}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" .Issue "delete" false "issue" true "diff" false "IsCommentPoster" $.IsIssuePoster}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui attached segment comment-body" role="article">
|
<div class="ui attached segment comment-body" role="article">
|
||||||
|
@ -53,8 +53,8 @@
|
|||||||
{{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}}
|
{{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}}
|
||||||
{{if not $.Repository.IsArchived}}
|
{{if not $.Repository.IsArchived}}
|
||||||
{{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
|
{{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}}
|
||||||
|
{{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" . "delete" true "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" . "delete" true "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui attached segment comment-body" role="article">
|
<div class="ui attached segment comment-body" role="article">
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
{{if .ctxData.IsSigned}}
|
||||||
<div class="item action ui dropdown jump pointing top right context-dropdown">
|
<div class="item action ui dropdown jump pointing top right context-dropdown">
|
||||||
<a class="context-menu muted">
|
<a class="context-menu muted">
|
||||||
{{svg "octicon-kebab-horizontal"}}
|
{{svg "octicon-kebab-horizontal"}}
|
||||||
@ -10,18 +11,17 @@
|
|||||||
{{$referenceUrl = printf "%s/files#%s" .ctxData.Issue.Link .item.HashTag}}
|
{{$referenceUrl = printf "%s/files#%s" .ctxData.Issue.Link .item.HashTag}}
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="item context js-aria-clickable" data-clipboard-text-type="url" data-clipboard-text="{{$referenceUrl}}">{{.ctxData.locale.Tr "repo.issues.context.copy_link"}}</div>
|
<div class="item context js-aria-clickable" data-clipboard-text-type="url" data-clipboard-text="{{$referenceUrl}}">{{.ctxData.locale.Tr "repo.issues.context.copy_link"}}</div>
|
||||||
{{if and .ctxData.IsSigned (not .ctxData.Repository.IsArchived)}}
|
<div class="item context js-aria-clickable quote-reply {{if .diff}}quote-reply-diff{{end}}" data-target="{{.item.HashTag}}-raw">{{.ctxData.locale.Tr "repo.issues.context.quote_reply"}}</div>
|
||||||
<div class="item context js-aria-clickable quote-reply {{if .diff}}quote-reply-diff{{end}}" data-target="{{.item.HashTag}}-raw">{{.ctxData.locale.Tr "repo.issues.context.quote_reply"}}</div>
|
{{if not .ctxData.UnitIssuesGlobalDisabled}}
|
||||||
{{if not .ctxData.UnitIssuesGlobalDisabled}}
|
<div class="item context js-aria-clickable reference-issue" data-target="{{.item.HashTag}}-raw" data-modal="#reference-issue-modal" data-poster="{{.item.Poster.GetDisplayName}}" data-poster-username="{{.item.Poster.Name}}" data-reference="{{$referenceUrl}}">{{.ctxData.locale.Tr "repo.issues.context.reference_issue"}}</div>
|
||||||
<div class="item context js-aria-clickable reference-issue" data-target="{{.item.HashTag}}-raw" data-modal="#reference-issue-modal" data-poster="{{.item.Poster.GetDisplayName}}" data-poster-username="{{.item.Poster.Name}}" data-reference="{{$referenceUrl}}">{{.ctxData.locale.Tr "repo.issues.context.reference_issue"}}</div>
|
{{end}}
|
||||||
{{end}}
|
{{if or .ctxData.Permission.IsAdmin .IsCommentPoster .ctxData.HasIssuesOrPullsWritePermission}}
|
||||||
{{if or .ctxData.Permission.IsAdmin .IsCommentPoster .ctxData.HasIssuesOrPullsWritePermission}}
|
<div class="divider"></div>
|
||||||
<div class="divider"></div>
|
<div class="item context js-aria-clickable edit-content">{{.ctxData.locale.Tr "repo.issues.context.edit"}}</div>
|
||||||
<div class="item context js-aria-clickable edit-content">{{.ctxData.locale.Tr "repo.issues.context.edit"}}</div>
|
{{if .delete}}
|
||||||
{{if .delete}}
|
<div class="item context js-aria-clickable delete-comment" data-comment-id={{.item.HashTag}} data-url="{{.ctxData.RepoLink}}/comments/{{.item.ID}}/delete" data-locale="{{.ctxData.locale.Tr "repo.issues.delete_comment_confirm"}}">{{.ctxData.locale.Tr "repo.issues.context.delete"}}</div>
|
||||||
<div class="item context js-aria-clickable delete-comment" data-comment-id={{.item.HashTag}} data-url="{{.ctxData.RepoLink}}/comments/{{.item.ID}}/delete" data-locale="{{.ctxData.locale.Tr "repo.issues.delete_comment_confirm"}}">{{.ctxData.locale.Tr "repo.issues.context.delete"}}</div>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{end}}
|
||||||
|
2
templates/swagger/v1_json.tmpl
generated
2
templates/swagger/v1_json.tmpl
generated
@ -21646,7 +21646,6 @@
|
|||||||
"properties": {
|
"properties": {
|
||||||
"created": {
|
"created": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "date-time",
|
|
||||||
"x-go-name": "CreatedUnix"
|
"x-go-name": "CreatedUnix"
|
||||||
},
|
},
|
||||||
"interval": {
|
"interval": {
|
||||||
@ -21659,7 +21658,6 @@
|
|||||||
},
|
},
|
||||||
"last_update": {
|
"last_update": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "date-time",
|
|
||||||
"x-go-name": "LastUpdateUnix"
|
"x-go-name": "LastUpdateUnix"
|
||||||
},
|
},
|
||||||
"remote_address": {
|
"remote_address": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user