diff --git a/routers/api/packages/container/manifest.go b/routers/api/packages/container/manifest.go
index 6167d00f311a9..e36c6a851bf03 100644
--- a/routers/api/packages/container/manifest.go
+++ b/routers/api/packages/container/manifest.go
@@ -17,6 +17,7 @@ import (
user_model "code.gitea.io/gitea/models/user"
"code.gitea.io/gitea/modules/json"
"code.gitea.io/gitea/modules/log"
+ "code.gitea.io/gitea/modules/notification"
packages_module "code.gitea.io/gitea/modules/packages"
container_module "code.gitea.io/gitea/modules/packages/container"
"code.gitea.io/gitea/modules/util"
@@ -71,11 +72,9 @@ func processManifest(mci *manifestCreationInfo, buf *packages_module.HashedBuffe
}
if isImageManifestMediaType(mci.MediaType) {
- d, err := processImageManifest(mci, buf)
- return d, err
+ return processImageManifest(mci, buf)
} else if isImageIndexMediaType(mci.MediaType) {
- d, err := processImageManifestIndex(mci, buf)
- return d, err
+ return processImageManifestIndex(mci, buf)
}
return "", errManifestInvalid
}
@@ -182,6 +181,10 @@ func processImageManifest(mci *manifestCreationInfo, buf *packages_module.Hashed
return err
}
+ if err := notifyPackageCreate(mci.Creator, pv); err != nil {
+ return err
+ }
+
manifestDigest = digest
return nil
@@ -271,6 +274,10 @@ func processImageManifestIndex(mci *manifestCreationInfo, buf *packages_module.H
return err
}
+ if err := notifyPackageCreate(mci.Creator, pv); err != nil {
+ return err
+ }
+
manifestDigest = digest
return nil
@@ -282,6 +289,17 @@ func processImageManifestIndex(mci *manifestCreationInfo, buf *packages_module.H
return manifestDigest, nil
}
+func notifyPackageCreate(doer *user_model.User, pv *packages_model.PackageVersion) error {
+ pd, err := packages_model.GetPackageDescriptor(db.DefaultContext, pv)
+ if err != nil {
+ return err
+ }
+
+ notification.NotifyPackageCreate(db.DefaultContext, doer, pd)
+
+ return nil
+}
+
func createPackageAndVersion(ctx context.Context, mci *manifestCreationInfo, metadata *container_module.Metadata) (*packages_model.PackageVersion, error) {
created := true
p := &packages_model.Package{
diff --git a/routers/web/user/home.go b/routers/web/user/home.go
index 36d9d4f019f7d..4f45c1d5c3149 100644
--- a/routers/web/user/home.go
+++ b/routers/web/user/home.go
@@ -338,6 +338,11 @@ func buildIssueOverview(ctx *context.Context, unitType unit.Type) {
filterMode int
)
+ // Default to recently updated, unlike repository issues list
+ if sortType == "" {
+ sortType = "recentupdate"
+ }
+
// --------------------------------------------------------------------------------
// Distinguish User from Organization.
// Org:
diff --git a/templates/base/head_script.tmpl b/templates/base/head_script.tmpl
index 1b130d9cb49df..ca8c7e6a77341 100644
--- a/templates/base/head_script.tmpl
+++ b/templates/base/head_script.tmpl
@@ -46,3 +46,4 @@ If you introduce mistakes in it, Gitea JavaScript code wouldn't run correctly.
{{/* in case some pages don't render the pageData, we make sure it is an object to prevent null access */}}
window.config.pageData = window.config.pageData || {};
+
diff --git a/templates/package/content/cargo.tmpl b/templates/package/content/cargo.tmpl
index 54c40a5b0dc0a..f78647ca69c63 100644
--- a/templates/package/content/cargo.tmpl
+++ b/templates/package/content/cargo.tmpl
@@ -8,7 +8,7 @@
default = "gitea"
[registries.gitea]
-index = "{{AppUrl}}{{.PackageDescriptor.Owner.Name}}/_cargo-index.git"
+index = "
knife[:supermarket_site] = '{{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/chef'
knife[:supermarket_site] = ' '
{
"repositories": [{
"type": "composer",
- "url": "{{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/composer"
+ "url": " "
}
]
}
conan remote add gitea {{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/conan
conan remote add gitea
channel_alias: {{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/conda
+ channel_alias:
channels:
- - {{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/conda
+ -
default_channels:
- - {{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/conda
+ -
{{range .PackageDescriptor.Files}}curl {{AppUrl}}api/packages/{{$.PackageDescriptor.Owner.Name}}/generic/{{$.PackageDescriptor.Package.Name}}/{{$.PackageDescriptor.Version.Version}}/{{.File.Name}}
-{{end}}
+ {{- range .PackageDescriptor.Files -}}
+curl
+ {{- end -}}
+
helm repo add gitea {{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/helm
+ helm repo add gitea
helm repo update
<repositories>
<repository>
<id>gitea</id>
- <url>{{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/maven</url>
+ <url> </url>
</repository>
</repositories>
<distributionManagement>
<repository>
<id>gitea</id>
- <url>{{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/maven</url>
+ <url> </url>
</repository>
<snapshotRepository>
<id>gitea</id>
- <url>{{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/maven</url>
+ <url> </url>
</snapshotRepository>
</distributionManagement>
mvn dependency:get -DremoteRepositories={{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/maven -Dartifact={{.PackageDescriptor.Metadata.GroupID}}:{{.PackageDescriptor.Metadata.ArtifactID}}:{{.PackageDescriptor.Version.Version}}
mvn dependency:get -DremoteRepositories= -Dartifact={{.PackageDescriptor.Metadata.GroupID}}:{{.PackageDescriptor.Metadata.ArtifactID}}:{{.PackageDescriptor.Version.Version}}
{{if .PackageDescriptor.Metadata.Scope}}{{.PackageDescriptor.Metadata.Scope}}:{{end}}registry={{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/npm/
{{if .PackageDescriptor.Metadata.Scope}}{{.PackageDescriptor.Metadata.Scope}}:{{end}}registry=
dotnet nuget add source --name Gitea --username your_username --password your_token {{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/nuget/index.json
dotnet nuget add source --name Gitea --username your_username --password your_token
dart pub add {{.PackageDescriptor.Package.Name}}:{{.PackageDescriptor.Version.Version}} --hosted-url={{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/pub/
dart pub add {{.PackageDescriptor.Package.Name}}:{{.PackageDescriptor.Version.Version}} --hosted-url=
pip install --index-url {{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/pypi/simple {{.PackageDescriptor.Package.Name}}
pip install --index-url
gem install {{.PackageDescriptor.Package.Name}} --version "{{.PackageDescriptor.Version.Version}}" --source "{{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/rubygems"
gem install {{.PackageDescriptor.Package.Name}} --version "{{.PackageDescriptor.Version.Version}}" --source " "
source "{{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/rubygems" do
+ source " " do
gem "{{.PackageDescriptor.Package.Name}}", "{{.PackageDescriptor.Version.Version}}"
end
vagrant box add --box-version {{.PackageDescriptor.Version.Version}} "{{AppUrl}}api/packages/{{.PackageDescriptor.Owner.Name}}/vagrant/{{.PackageDescriptor.Package.Name}}"
vagrant box add --box-version {{.PackageDescriptor.Version.Version}} " "