diff --git a/models/actions/run_job_status_test.go b/models/actions/run_job_status_test.go index 04fd9ceba7..523d38327e 100644 --- a/models/actions/run_job_status_test.go +++ b/models/actions/run_job_status_test.go @@ -69,7 +69,7 @@ func TestAggregateJobStatus(t *testing.T) { {[]Status{StatusFailure, StatusBlocked}, StatusFailure}, // skipped with other status - // TODO: need to clarify whether a PR with "skipped" job status is considered as "mergeable" or not. + // "all skipped" is also considered as "mergeable" by "services/actions.toCommitStatus", the same as GitHub {[]Status{StatusSkipped}, StatusSkipped}, {[]Status{StatusSkipped, StatusSuccess}, StatusSuccess}, {[]Status{StatusSkipped, StatusFailure}, StatusFailure}, diff --git a/modules/markup/markdown/markdown.go b/modules/markup/markdown/markdown.go index a14c0cad59..b5fffccdb9 100644 --- a/modules/markup/markdown/markdown.go +++ b/modules/markup/markdown/markdown.go @@ -129,7 +129,8 @@ func SpecializedMarkdown(ctx *markup.RenderContext) *GlodmarkRender { Enabled: setting.Markdown.EnableMath, ParseDollarInline: true, ParseDollarBlock: true, - ParseSquareBlock: true, // TODO: this is a bad syntax, it should be deprecated in the future (by some config options) + ParseSquareBlock: true, // TODO: this is a bad syntax "\[ ... \]", it conflicts with normal markdown escaping, it should be deprecated in the future (by some config options) + // ParseBracketInline: true, // TODO: this is also a bad syntax "\( ... \)", it also conflicts, it should be deprecated in the future }), meta.Meta, ), diff --git a/modules/repository/fork.go b/modules/repository/fork.go index d530634071..84ed4b23d6 100644 --- a/modules/repository/fork.go +++ b/modules/repository/fork.go @@ -12,6 +12,9 @@ import ( "code.gitea.io/gitea/modules/setting" ) +// CanUserForkBetweenOwners returns true if user can fork between owners. +// By default, a user can fork a repository from another owner, but not from themselves. +// Many users really like to fork their own repositories, so add an experimental setting to allow this. func CanUserForkBetweenOwners(id1, id2 int64) bool { if id1 != id2 { return true diff --git a/routers/web/repo/actions/view.go b/routers/web/repo/actions/view.go index b711038da0..ba17fa427d 100644 --- a/routers/web/repo/actions/view.go +++ b/routers/web/repo/actions/view.go @@ -205,8 +205,11 @@ func ViewPost(ctx *context_module.Context) { } } + // TODO: "ComposeMetas" (usually for comment) is not quite right, but it is still the same as what template "RenderCommitMessage" does. + // need to be refactored together in the future metas := ctx.Repo.Repository.ComposeMetas(ctx) + // the title for the "run" is from the commit message resp.State.Run.Title = run.Title resp.State.Run.TitleHTML = templates.NewRenderUtils(ctx).RenderCommitMessage(run.Title, metas) resp.State.Run.Link = run.Link() diff --git a/services/auth/source/ldap/source_authenticate.go b/services/auth/source/ldap/source_authenticate.go index 020e5784dc..6a6c60cd40 100644 --- a/services/auth/source/ldap/source_authenticate.go +++ b/services/auth/source/ldap/source_authenticate.go @@ -12,6 +12,7 @@ import ( "code.gitea.io/gitea/models/auth" user_model "code.gitea.io/gitea/models/user" auth_module "code.gitea.io/gitea/modules/auth" + "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/optional" asymkey_service "code.gitea.io/gitea/services/asymkey" source_service "code.gitea.io/gitea/services/auth/source" @@ -31,7 +32,12 @@ func (source *Source) Authenticate(ctx context.Context, user *user_model.User, u return nil, user_model.ErrUserNotExist{Name: loginName} } // Fallback. + // FIXME: this fallback would cause problems when the "Username" attribute is not set and a user inputs their email. + // In this case, the email would be used as the username, and will cause the "CreateUser" failure for the first login. if sr.Username == "" { + if strings.Contains(userName, "@") { + log.Error("No username in search result (Username Attribute is not set properly?), using email as username might cause problems") + } sr.Username = userName } if sr.Mail == "" { diff --git a/templates/package/content/container.tmpl b/templates/package/content/container.tmpl index 207774bfef..04732d276a 100644 --- a/templates/package/content/container.tmpl +++ b/templates/package/content/container.tmpl @@ -36,9 +36,10 @@
{{range .PackageDescriptor.Metadata.Manifests}} + {{/* "unknown/unknown" is attestation-manifest, so we should skip it */}} {{if ne .Platform "unknown/unknown"}}