Compare commits
10 Commits
a370efc13f
...
a838901a06
Author | SHA1 | Date |
---|---|---|
silverwind | a838901a06 | |
silverwind | 88479e0dfc | |
wxiaoguang | f42cd4561b | |
techknowlogick | bfef7d4735 | |
silverwind | 1772814605 | |
Panagiotis "Ivory" Vasilopoulos | 2cbd377e1f | |
CaiCandong | 7a69d71733 | |
yp05327 | 918d0f033d | |
nekrondev | 3c91b09c19 | |
Lunny Xiao | e7cbb0e7c9 |
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "Gitea DevContainer",
|
"name": "Gitea DevContainer",
|
||||||
"image": "mcr.microsoft.com/devcontainers/go:1.20",
|
"image": "mcr.microsoft.com/devcontainers/go:1.20-bullseye",
|
||||||
"features": {
|
"features": {
|
||||||
// installs nodejs into container
|
// installs nodejs into container
|
||||||
"ghcr.io/devcontainers/features/node:1": {
|
"ghcr.io/devcontainers/features/node:1": {
|
||||||
|
|
|
@ -13,7 +13,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: ">=1.20"
|
go-version: "~1.21"
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- run: make generate-license generate-gitignore
|
- run: make generate-license generate-gitignore
|
||||||
timeout-minutes: 40
|
timeout-minutes: 40
|
||||||
|
|
|
@ -19,7 +19,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: ">=1.20"
|
go-version: "~1.21"
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- run: make deps-backend deps-tools
|
- run: make deps-backend deps-tools
|
||||||
- run: make lint-backend
|
- run: make lint-backend
|
||||||
|
@ -59,7 +59,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: ">=1.20"
|
go-version: "~1.21"
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- run: make deps-backend deps-tools
|
- run: make deps-backend deps-tools
|
||||||
- run: make lint-go-windows lint-go-vet
|
- run: make lint-go-windows lint-go-vet
|
||||||
|
@ -76,7 +76,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: ">=1.20"
|
go-version: "~1.21"
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- run: make deps-backend deps-tools
|
- run: make deps-backend deps-tools
|
||||||
- run: make lint-go
|
- run: make lint-go
|
||||||
|
@ -91,7 +91,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: ">=1.20"
|
go-version: "~1.21"
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- run: make deps-backend deps-tools
|
- run: make deps-backend deps-tools
|
||||||
- run: make --always-make checks-backend # ensure the "go-licenses" make target runs
|
- run: make --always-make checks-backend # ensure the "go-licenses" make target runs
|
||||||
|
@ -119,7 +119,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: ">=1.20"
|
go-version: "~1.21"
|
||||||
check-latest: true
|
check-latest: true
|
||||||
# no frontend build here as backend should be able to build
|
# no frontend build here as backend should be able to build
|
||||||
# even without any frontend files
|
# even without any frontend files
|
||||||
|
|
|
@ -41,7 +41,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: ">=1.20"
|
go-version: "~1.21"
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: Add hosts to /etc/hosts
|
- name: Add hosts to /etc/hosts
|
||||||
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 pgsql ldap minio" | sudo tee -a /etc/hosts'
|
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 pgsql ldap minio" | sudo tee -a /etc/hosts'
|
||||||
|
@ -66,7 +66,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: ">=1.20"
|
go-version: "~1.21"
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- run: make deps-backend
|
- run: make deps-backend
|
||||||
- run: make backend
|
- run: make backend
|
||||||
|
@ -131,7 +131,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: ">=1.20"
|
go-version: "~1.21"
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: Add hosts to /etc/hosts
|
- name: Add hosts to /etc/hosts
|
||||||
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql elasticsearch meilisearch smtpimap" | sudo tee -a /etc/hosts'
|
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql elasticsearch meilisearch smtpimap" | sudo tee -a /etc/hosts'
|
||||||
|
@ -181,7 +181,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: ">=1.20"
|
go-version: "~1.21"
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: Add hosts to /etc/hosts
|
- name: Add hosts to /etc/hosts
|
||||||
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts'
|
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts'
|
||||||
|
@ -213,7 +213,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: ">=1.20"
|
go-version: "~1.21"
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: Add hosts to /etc/hosts
|
- name: Add hosts to /etc/hosts
|
||||||
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql8" | sudo tee -a /etc/hosts'
|
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql8" | sudo tee -a /etc/hosts'
|
||||||
|
@ -244,7 +244,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: ">=1.20"
|
go-version: "~1.21"
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: Add hosts to /etc/hosts
|
- name: Add hosts to /etc/hosts
|
||||||
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mssql" | sudo tee -a /etc/hosts'
|
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mssql" | sudo tee -a /etc/hosts'
|
||||||
|
|
|
@ -19,7 +19,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: ">=1.20"
|
go-version: "~1.21"
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -14,7 +14,7 @@ jobs:
|
||||||
- run: git fetch --unshallow --quiet --tags --force
|
- run: git fetch --unshallow --quiet --tags --force
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
go-version: ">=1.20"
|
go-version: "~1.21"
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -355,6 +355,10 @@ func runRepoSyncReleases(_ *cli.Context) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := git.InitSimple(ctx); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
log.Trace("Synchronizing repository releases (this may take a while)")
|
log.Trace("Synchronizing repository releases (this may take a while)")
|
||||||
for page := 1; ; page++ {
|
for page := 1; ; page++ {
|
||||||
repos, count, err := repo_model.SearchRepositoryByName(ctx, &repo_model.SearchRepoOptions{
|
repos, count, err := repo_model.SearchRepositoryByName(ctx, &repo_model.SearchRepoOptions{
|
||||||
|
|
|
@ -377,7 +377,7 @@ func (list ReactionList) GetFirstUsers() string {
|
||||||
if buffer.Len() > 0 {
|
if buffer.Len() > 0 {
|
||||||
buffer.WriteString(", ")
|
buffer.WriteString(", ")
|
||||||
}
|
}
|
||||||
buffer.WriteString(reaction.User.DisplayName())
|
buffer.WriteString(reaction.User.Name)
|
||||||
if rem--; rem == 0 {
|
if rem--; rem == 0 {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@ func TestIssueReactionCount(t *testing.T) {
|
||||||
reactions := reactionsList.GroupByType()
|
reactions := reactionsList.GroupByType()
|
||||||
assert.Len(t, reactions["heart"], 4)
|
assert.Len(t, reactions["heart"], 4)
|
||||||
assert.Equal(t, 2, reactions["heart"].GetMoreUserCount())
|
assert.Equal(t, 2, reactions["heart"].GetMoreUserCount())
|
||||||
assert.Equal(t, user1.DisplayName()+", "+user2.DisplayName(), reactions["heart"].GetFirstUsers())
|
assert.Equal(t, user1.Name+", "+user2.Name, reactions["heart"].GetFirstUsers())
|
||||||
assert.True(t, reactions["heart"].HasUser(1))
|
assert.True(t, reactions["heart"].HasUser(1))
|
||||||
assert.False(t, reactions["heart"].HasUser(5))
|
assert.False(t, reactions["heart"].HasUser(5))
|
||||||
assert.False(t, reactions["heart"].HasUser(0))
|
assert.False(t, reactions["heart"].HasUser(0))
|
||||||
|
|
|
@ -84,6 +84,7 @@ func NewMinioStorage(ctx context.Context, cfg *setting.Storage) (ObjectStorage,
|
||||||
Creds: credentials.NewStaticV4(config.AccessKeyID, config.SecretAccessKey, ""),
|
Creds: credentials.NewStaticV4(config.AccessKeyID, config.SecretAccessKey, ""),
|
||||||
Secure: config.UseSSL,
|
Secure: config.UseSSL,
|
||||||
Transport: &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: config.InsecureSkipVerify}},
|
Transport: &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: config.InsecureSkipVerify}},
|
||||||
|
Region: config.Location,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, convertMinioErr(err)
|
return nil, convertMinioErr(err)
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
18
package.json
18
package.json
|
@ -22,7 +22,7 @@
|
||||||
"css-loader": "6.8.1",
|
"css-loader": "6.8.1",
|
||||||
"dropzone": "6.0.0-beta.2",
|
"dropzone": "6.0.0-beta.2",
|
||||||
"easymde": "2.18.0",
|
"easymde": "2.18.0",
|
||||||
"esbuild-loader": "3.0.1",
|
"esbuild-loader": "4.0.0",
|
||||||
"escape-goat": "4.0.0",
|
"escape-goat": "4.0.0",
|
||||||
"fast-glob": "3.3.1",
|
"fast-glob": "3.3.1",
|
||||||
"jquery": "3.7.0",
|
"jquery": "3.7.0",
|
||||||
|
@ -33,12 +33,12 @@
|
||||||
"mermaid": "10.3.0",
|
"mermaid": "10.3.0",
|
||||||
"mini-css-extract-plugin": "2.7.6",
|
"mini-css-extract-plugin": "2.7.6",
|
||||||
"minimatch": "9.0.3",
|
"minimatch": "9.0.3",
|
||||||
"monaco-editor": "0.40.0",
|
"monaco-editor": "0.41.0",
|
||||||
"monaco-editor-webpack-plugin": "7.1.0",
|
"monaco-editor-webpack-plugin": "7.1.0",
|
||||||
"pdfobject": "2.2.12",
|
"pdfobject": "2.2.12",
|
||||||
"pretty-ms": "8.0.0",
|
"pretty-ms": "8.0.0",
|
||||||
"sortablejs": "1.15.0",
|
"sortablejs": "1.15.0",
|
||||||
"swagger-ui-dist": "5.2.0",
|
"swagger-ui-dist": "5.3.1",
|
||||||
"throttle-debounce": "5.0.0",
|
"throttle-debounce": "5.0.0",
|
||||||
"tinycolor2": "1.6.0",
|
"tinycolor2": "1.6.0",
|
||||||
"tippy.js": "6.3.7",
|
"tippy.js": "6.3.7",
|
||||||
|
@ -54,9 +54,9 @@
|
||||||
"wrap-ansi": "8.1.0"
|
"wrap-ansi": "8.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint-community/eslint-plugin-eslint-comments": "3.2.1",
|
"@eslint-community/eslint-plugin-eslint-comments": "4.1.0",
|
||||||
"@playwright/test": "1.36.2",
|
"@playwright/test": "1.36.2",
|
||||||
"@stoplight/spectral-cli": "6.10.0",
|
"@stoplight/spectral-cli": "6.10.1",
|
||||||
"@vitejs/plugin-vue": "4.2.3",
|
"@vitejs/plugin-vue": "4.2.3",
|
||||||
"eslint": "8.46.0",
|
"eslint": "8.46.0",
|
||||||
"eslint-plugin-array-func": "3.1.8",
|
"eslint-plugin-array-func": "3.1.8",
|
||||||
|
@ -66,9 +66,9 @@
|
||||||
"eslint-plugin-no-jquery": "2.7.0",
|
"eslint-plugin-no-jquery": "2.7.0",
|
||||||
"eslint-plugin-no-use-extend-native": "0.5.0",
|
"eslint-plugin-no-use-extend-native": "0.5.0",
|
||||||
"eslint-plugin-regexp": "1.15.0",
|
"eslint-plugin-regexp": "1.15.0",
|
||||||
"eslint-plugin-sonarjs": "0.19.0",
|
"eslint-plugin-sonarjs": "0.20.0",
|
||||||
"eslint-plugin-unicorn": "48.0.1",
|
"eslint-plugin-unicorn": "48.0.1",
|
||||||
"eslint-plugin-vue": "9.16.0",
|
"eslint-plugin-vue": "9.17.0",
|
||||||
"eslint-plugin-wc": "1.5.0",
|
"eslint-plugin-wc": "1.5.0",
|
||||||
"jsdom": "22.1.0",
|
"jsdom": "22.1.0",
|
||||||
"markdownlint-cli": "0.35.0",
|
"markdownlint-cli": "0.35.0",
|
||||||
|
@ -78,9 +78,9 @@
|
||||||
"stylelint-declaration-strict-value": "1.9.2",
|
"stylelint-declaration-strict-value": "1.9.2",
|
||||||
"stylelint-stylistic": "0.4.3",
|
"stylelint-stylistic": "0.4.3",
|
||||||
"svgo": "3.0.2",
|
"svgo": "3.0.2",
|
||||||
"updates": "14.3.4",
|
"updates": "14.3.5",
|
||||||
"vite-string-plugin": "1.1.2",
|
"vite-string-plugin": "1.1.2",
|
||||||
"vitest": "0.33.0"
|
"vitest": "0.34.1"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"defaults",
|
"defaults",
|
||||||
|
|
|
@ -1131,7 +1131,7 @@ func registerRoutes(m *web.Route) {
|
||||||
m.Get(".atom", feedEnabled, repo.ReleasesFeedAtom)
|
m.Get(".atom", feedEnabled, repo.ReleasesFeedAtom)
|
||||||
}, ctxDataSet("EnableFeed", setting.Other.EnableFeed),
|
}, ctxDataSet("EnableFeed", setting.Other.EnableFeed),
|
||||||
repo.MustBeNotEmpty, reqRepoReleaseReader, context.RepoRefByType(context.RepoRefTag, true))
|
repo.MustBeNotEmpty, reqRepoReleaseReader, context.RepoRefByType(context.RepoRefTag, true))
|
||||||
m.Get("/releases/attachments/{uuid}", repo.GetAttachment, repo.MustBeNotEmpty, reqRepoReleaseReader)
|
m.Get("/releases/attachments/{uuid}", repo.MustBeNotEmpty, reqRepoReleaseReader, repo.GetAttachment)
|
||||||
m.Group("/releases", func() {
|
m.Group("/releases", func() {
|
||||||
m.Get("/new", repo.NewRelease)
|
m.Get("/new", repo.NewRelease)
|
||||||
m.Post("/new", web.Bind(forms.NewReleaseForm{}), repo.NewReleasePost)
|
m.Post("/new", web.Bind(forms.NewReleaseForm{}), repo.NewReleasePost)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{{.locale.Tr "repo.issues.context.reference_issue"}}
|
{{.locale.Tr "repo.issues.context.reference_issue"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="content" style="text-align:left">
|
<div class="content" style="text-align:left">
|
||||||
<form class="ui form" action="{{printf "%s/issues/new" .Repository.Link}}" method="post">
|
<form class="ui form form-fetch-action" action="{{printf "%s/issues/new" .Repository.Link}}" method="post">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<div class="ui segment content">
|
<div class="ui segment content">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
|
|
@ -96,7 +96,6 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
border-bottom: 0 !important;
|
border-bottom: 0 !important;
|
||||||
padding: 3px !important;
|
padding: 3px !important;
|
||||||
width: 20%;
|
|
||||||
max-width: 60px;
|
max-width: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@ import webpack from 'webpack';
|
||||||
import {fileURLToPath} from 'node:url';
|
import {fileURLToPath} from 'node:url';
|
||||||
import {readFileSync} from 'node:fs';
|
import {readFileSync} from 'node:fs';
|
||||||
import {env} from 'node:process';
|
import {env} from 'node:process';
|
||||||
import {LightningCssMinifyPlugin} from 'lightningcss-loader';
|
|
||||||
|
|
||||||
const {EsbuildPlugin} = EsBuildLoader;
|
const {EsbuildPlugin} = EsBuildLoader;
|
||||||
const {SourceMapDevToolPlugin, DefinePlugin} = webpack;
|
const {SourceMapDevToolPlugin, DefinePlugin} = webpack;
|
||||||
|
@ -52,6 +51,12 @@ const filterCssImport = (url, ...args) => {
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// in case lightningcss fails to load, fall back to esbuild for css minify
|
||||||
|
let LightningCssMinifyPlugin;
|
||||||
|
try {
|
||||||
|
({LightningCssMinifyPlugin} = await import('lightningcss-loader'));
|
||||||
|
} catch {}
|
||||||
|
|
||||||
/** @type {import("webpack").Configuration} */
|
/** @type {import("webpack").Configuration} */
|
||||||
export default {
|
export default {
|
||||||
mode: isProduction ? 'production' : 'development',
|
mode: isProduction ? 'production' : 'development',
|
||||||
|
@ -97,10 +102,10 @@ export default {
|
||||||
new EsbuildPlugin({
|
new EsbuildPlugin({
|
||||||
target: 'es2015',
|
target: 'es2015',
|
||||||
minify: true,
|
minify: true,
|
||||||
css: false,
|
css: !LightningCssMinifyPlugin,
|
||||||
legalComments: 'none',
|
legalComments: 'none',
|
||||||
}),
|
}),
|
||||||
new LightningCssMinifyPlugin(),
|
LightningCssMinifyPlugin && new LightningCssMinifyPlugin(),
|
||||||
],
|
],
|
||||||
splitChunks: {
|
splitChunks: {
|
||||||
chunks: 'async',
|
chunks: 'async',
|
||||||
|
|
Loading…
Reference in New Issue