mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-02-18 04:15:15 +00:00
Merge branch 'origin/main' into 'next-release/main'
This commit is contained in:
commit
fbcd98ab1a
5 changed files with 1860 additions and 1316 deletions
|
@ -18,7 +18,7 @@
|
|||
"@docusaurus/plugin-content-blog": "^3.5.2",
|
||||
"@docusaurus/preset-classic": "^3.5.2",
|
||||
"@easyops-cn/docusaurus-search-local": "^0.45.0",
|
||||
"@mdx-js/react": "^3.0.1",
|
||||
"@mdx-js/react": "^3.1.0",
|
||||
"@svgr/webpack": "^8.1.0",
|
||||
"clsx": "^2.1.1",
|
||||
"esbuild-loader": "^4.2.2",
|
||||
|
@ -45,11 +45,11 @@
|
|||
"@docusaurus/module-type-aliases": "^3.5.2",
|
||||
"@docusaurus/tsconfig": "3.5.2",
|
||||
"@docusaurus/types": "^3.5.2",
|
||||
"@types/node": "^20.16.10",
|
||||
"@types/react": "^18.3.11",
|
||||
"@types/node": "^20.17.1",
|
||||
"@types/react": "^18.3.12",
|
||||
"@types/react-helmet": "^6.1.11",
|
||||
"@types/react-router-dom": "^5.3.3",
|
||||
"typescript": "^5.6.2"
|
||||
"typescript": "^5.6.3"
|
||||
},
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
|
|
3031
docs/pnpm-lock.yaml
3031
docs/pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
@ -303,7 +303,9 @@ func extractFromPath(str string) (string, string, error) {
|
|||
if len(s) < minPathComponents {
|
||||
return "", "", fmt.Errorf("minimum match not found")
|
||||
}
|
||||
return s[0], s[1], nil
|
||||
owner := strings.Join(s[:len(s)-1], "/")
|
||||
name := s[len(s)-1]
|
||||
return owner, name, nil
|
||||
}
|
||||
|
||||
func convertLabels(from []*gitlab.EventLabel) []string {
|
||||
|
|
|
@ -300,3 +300,68 @@ func Test_GitLab(t *testing.T) {
|
|||
})
|
||||
})
|
||||
}
|
||||
|
||||
func TestExtractFromPath(t *testing.T) {
|
||||
type testCase struct {
|
||||
name string
|
||||
input string
|
||||
wantOwner string
|
||||
wantName string
|
||||
errContains string
|
||||
}
|
||||
|
||||
tests := []testCase{
|
||||
{
|
||||
name: "basic two components",
|
||||
input: "owner/repo",
|
||||
wantOwner: "owner",
|
||||
wantName: "repo",
|
||||
},
|
||||
{
|
||||
name: "three components",
|
||||
input: "owner/group/repo",
|
||||
wantOwner: "owner/group",
|
||||
wantName: "repo",
|
||||
},
|
||||
{
|
||||
name: "many components",
|
||||
input: "owner/group/subgroup/deep/repo",
|
||||
wantOwner: "owner/group/subgroup/deep",
|
||||
wantName: "repo",
|
||||
},
|
||||
{
|
||||
name: "empty string",
|
||||
input: "",
|
||||
errContains: "minimum match not found",
|
||||
},
|
||||
{
|
||||
name: "single component",
|
||||
input: "onlyrepo",
|
||||
errContains: "minimum match not found",
|
||||
},
|
||||
{
|
||||
name: "trailing slash",
|
||||
input: "owner/repo/",
|
||||
wantOwner: "owner/repo",
|
||||
wantName: "",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
owner, name, err := extractFromPath(tc.input)
|
||||
|
||||
// Check error expectations
|
||||
if tc.errContains != "" {
|
||||
if assert.Error(t, err) {
|
||||
assert.Contains(t, err.Error(), tc.errContains)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
assert.NoError(t, err)
|
||||
assert.EqualValues(t, tc.wantOwner, owner)
|
||||
assert.EqualValues(t, tc.wantName, name)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ importers:
|
|||
devDependencies:
|
||||
'@antfu/eslint-config':
|
||||
specifier: ^3.3.2
|
||||
version: 3.8.0(@typescript-eslint/utils@8.10.0(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3))(@vue/compiler-sfc@3.5.12)(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3)(vitest@2.1.3(@types/node@20.16.13)(jsdom@25.0.1)(stylus@0.57.0))
|
||||
version: 3.8.0(@typescript-eslint/utils@8.10.0(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3))(@vue/compiler-sfc@3.5.12)(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3)(vitest@2.1.3(@types/node@20.17.1)(jsdom@25.0.1)(stylus@0.57.0))
|
||||
'@eslint/js':
|
||||
specifier: ^9.9.0
|
||||
version: 9.13.0
|
||||
|
@ -83,10 +83,10 @@ importers:
|
|||
version: 4.17.12
|
||||
'@types/node':
|
||||
specifier: ^20.14.15
|
||||
version: 20.16.13
|
||||
version: 20.17.1
|
||||
'@types/prismjs':
|
||||
specifier: ^1.26.4
|
||||
version: 1.26.4
|
||||
version: 1.26.5
|
||||
'@types/semver':
|
||||
specifier: ^7.5.8
|
||||
version: 7.5.8
|
||||
|
@ -95,7 +95,7 @@ importers:
|
|||
version: 1.4.6
|
||||
'@vitejs/plugin-vue':
|
||||
specifier: ^5.1.2
|
||||
version: 5.1.4(vite@5.4.9(@types/node@20.16.13)(stylus@0.57.0))(vue@3.5.12(typescript@5.6.3))
|
||||
version: 5.1.4(vite@5.4.10(@types/node@20.17.1)(stylus@0.57.0))(vue@3.5.12(typescript@5.6.3))
|
||||
'@vue/compiler-sfc':
|
||||
specifier: ^3.4.38
|
||||
version: 3.5.12
|
||||
|
@ -128,19 +128,19 @@ importers:
|
|||
version: 5.6.3
|
||||
vite:
|
||||
specifier: ^5.4.1
|
||||
version: 5.4.9(@types/node@20.16.13)(stylus@0.57.0)
|
||||
version: 5.4.10(@types/node@20.17.1)(stylus@0.57.0)
|
||||
vite-plugin-prismjs:
|
||||
specifier: ^0.0.11
|
||||
version: 0.0.11(prismjs@1.29.0)
|
||||
vite-plugin-windicss:
|
||||
specifier: ^1.9.3
|
||||
version: 1.9.3(vite@5.4.9(@types/node@20.16.13)(stylus@0.57.0))
|
||||
version: 1.9.3(vite@5.4.10(@types/node@20.17.1)(stylus@0.57.0))
|
||||
vite-svg-loader:
|
||||
specifier: ^5.1.0
|
||||
version: 5.1.0(vue@3.5.12(typescript@5.6.3))
|
||||
vitest:
|
||||
specifier: ^2.0.5
|
||||
version: 2.1.3(@types/node@20.16.13)(jsdom@25.0.1)(stylus@0.57.0)
|
||||
version: 2.1.3(@types/node@20.17.1)(jsdom@25.0.1)(stylus@0.57.0)
|
||||
vue-tsc:
|
||||
specifier: ^2.0.29
|
||||
version: 2.1.6(typescript@5.6.3)
|
||||
|
@ -783,14 +783,14 @@ packages:
|
|||
'@types/ms@0.7.34':
|
||||
resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==}
|
||||
|
||||
'@types/node@20.16.13':
|
||||
resolution: {integrity: sha512-GjQ7im10B0labo8ZGXDGROUl9k0BNyDgzfGpb4g/cl+4yYDWVKcozANF4FGr4/p0O/rAkQClM6Wiwkije++1Tg==}
|
||||
'@types/node@20.17.1':
|
||||
resolution: {integrity: sha512-j2VlPv1NnwPJbaCNv69FO/1z4lId0QmGvpT41YxitRtWlg96g/j8qcv2RKsLKe2F6OJgyXhupN1Xo17b2m139Q==}
|
||||
|
||||
'@types/normalize-package-data@2.4.4':
|
||||
resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==}
|
||||
|
||||
'@types/prismjs@1.26.4':
|
||||
resolution: {integrity: sha512-rlAnzkW2sZOjbqZ743IHUhFcvzaGbqijwOu8QZnZCjfQzBqFE3s4lOTJEsxikImav9uzz/42I+O7YUs1mWgMlg==}
|
||||
'@types/prismjs@1.26.5':
|
||||
resolution: {integrity: sha512-AUZTa7hQ2KY5L7AmtSiqxlhWxb4ina0yd8hNbl4TWuqnv/pFP0nDMb3YrfSBf4hJVGLh2YEIBfKaBW/9UEl6IQ==}
|
||||
|
||||
'@types/semver@7.5.8':
|
||||
resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==}
|
||||
|
@ -2655,8 +2655,8 @@ packages:
|
|||
peerDependencies:
|
||||
vue: '>=3.2.13'
|
||||
|
||||
vite@5.4.9:
|
||||
resolution: {integrity: sha512-20OVpJHh0PAM0oSOELa5GaZNWeDjcAvQjGXy2Uyr+Tp+/D2/Hdz6NLgpJLsarPTA2QJ6v8mX2P1ZfbsSKvdMkg==}
|
||||
vite@5.4.10:
|
||||
resolution: {integrity: sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==}
|
||||
engines: {node: ^18.0.0 || >=20.0.0}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
|
@ -2873,7 +2873,7 @@ snapshots:
|
|||
'@jridgewell/gen-mapping': 0.3.5
|
||||
'@jridgewell/trace-mapping': 0.3.25
|
||||
|
||||
'@antfu/eslint-config@3.8.0(@typescript-eslint/utils@8.10.0(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3))(@vue/compiler-sfc@3.5.12)(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3)(vitest@2.1.3(@types/node@20.16.13)(jsdom@25.0.1)(stylus@0.57.0))':
|
||||
'@antfu/eslint-config@3.8.0(@typescript-eslint/utils@8.10.0(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3))(@vue/compiler-sfc@3.5.12)(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3)(vitest@2.1.3(@types/node@20.17.1)(jsdom@25.0.1)(stylus@0.57.0))':
|
||||
dependencies:
|
||||
'@antfu/install-pkg': 0.4.1
|
||||
'@clack/prompts': 0.7.0
|
||||
|
@ -2882,7 +2882,7 @@ snapshots:
|
|||
'@stylistic/eslint-plugin': 2.9.0(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3)
|
||||
'@typescript-eslint/eslint-plugin': 8.10.0(@typescript-eslint/parser@8.10.0(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3)
|
||||
'@typescript-eslint/parser': 8.10.0(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3)
|
||||
'@vitest/eslint-plugin': 1.1.7(@typescript-eslint/utils@8.10.0(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3)(vitest@2.1.3(@types/node@20.16.13)(jsdom@25.0.1)(stylus@0.57.0))
|
||||
'@vitest/eslint-plugin': 1.1.7(@typescript-eslint/utils@8.10.0(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3)(vitest@2.1.3(@types/node@20.17.1)(jsdom@25.0.1)(stylus@0.57.0))
|
||||
eslint: 9.13.0(jiti@1.21.6)
|
||||
eslint-config-flat-gitignore: 0.3.0(eslint@9.13.0(jiti@1.21.6))
|
||||
eslint-flat-config-utils: 0.4.0
|
||||
|
@ -3482,13 +3482,13 @@ snapshots:
|
|||
|
||||
'@types/ms@0.7.34': {}
|
||||
|
||||
'@types/node@20.16.13':
|
||||
'@types/node@20.17.1':
|
||||
dependencies:
|
||||
undici-types: 6.19.8
|
||||
|
||||
'@types/normalize-package-data@2.4.4': {}
|
||||
|
||||
'@types/prismjs@1.26.4': {}
|
||||
'@types/prismjs@1.26.5': {}
|
||||
|
||||
'@types/semver@7.5.8': {}
|
||||
|
||||
|
@ -3606,18 +3606,18 @@ snapshots:
|
|||
'@typescript-eslint/types': 8.10.0
|
||||
eslint-visitor-keys: 3.4.3
|
||||
|
||||
'@vitejs/plugin-vue@5.1.4(vite@5.4.9(@types/node@20.16.13)(stylus@0.57.0))(vue@3.5.12(typescript@5.6.3))':
|
||||
'@vitejs/plugin-vue@5.1.4(vite@5.4.10(@types/node@20.17.1)(stylus@0.57.0))(vue@3.5.12(typescript@5.6.3))':
|
||||
dependencies:
|
||||
vite: 5.4.9(@types/node@20.16.13)(stylus@0.57.0)
|
||||
vite: 5.4.10(@types/node@20.17.1)(stylus@0.57.0)
|
||||
vue: 3.5.12(typescript@5.6.3)
|
||||
|
||||
'@vitest/eslint-plugin@1.1.7(@typescript-eslint/utils@8.10.0(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3)(vitest@2.1.3(@types/node@20.16.13)(jsdom@25.0.1)(stylus@0.57.0))':
|
||||
'@vitest/eslint-plugin@1.1.7(@typescript-eslint/utils@8.10.0(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3)(vitest@2.1.3(@types/node@20.17.1)(jsdom@25.0.1)(stylus@0.57.0))':
|
||||
dependencies:
|
||||
'@typescript-eslint/utils': 8.10.0(eslint@9.13.0(jiti@1.21.6))(typescript@5.6.3)
|
||||
eslint: 9.13.0(jiti@1.21.6)
|
||||
optionalDependencies:
|
||||
typescript: 5.6.3
|
||||
vitest: 2.1.3(@types/node@20.16.13)(jsdom@25.0.1)(stylus@0.57.0)
|
||||
vitest: 2.1.3(@types/node@20.17.1)(jsdom@25.0.1)(stylus@0.57.0)
|
||||
|
||||
'@vitest/expect@2.1.3':
|
||||
dependencies:
|
||||
|
@ -3626,13 +3626,13 @@ snapshots:
|
|||
chai: 5.1.1
|
||||
tinyrainbow: 1.2.0
|
||||
|
||||
'@vitest/mocker@2.1.3(@vitest/spy@2.1.3)(vite@5.4.9(@types/node@20.16.13)(stylus@0.57.0))':
|
||||
'@vitest/mocker@2.1.3(@vitest/spy@2.1.3)(vite@5.4.10(@types/node@20.17.1)(stylus@0.57.0))':
|
||||
dependencies:
|
||||
'@vitest/spy': 2.1.3
|
||||
estree-walker: 3.0.3
|
||||
magic-string: 0.30.12
|
||||
optionalDependencies:
|
||||
vite: 5.4.9(@types/node@20.16.13)(stylus@0.57.0)
|
||||
vite: 5.4.10(@types/node@20.17.1)(stylus@0.57.0)
|
||||
|
||||
'@vitest/pretty-format@2.1.3':
|
||||
dependencies:
|
||||
|
@ -5616,12 +5616,12 @@ snapshots:
|
|||
spdx-correct: 3.2.0
|
||||
spdx-expression-parse: 3.0.1
|
||||
|
||||
vite-node@2.1.3(@types/node@20.16.13)(stylus@0.57.0):
|
||||
vite-node@2.1.3(@types/node@20.17.1)(stylus@0.57.0):
|
||||
dependencies:
|
||||
cac: 6.7.14
|
||||
debug: 4.3.7
|
||||
pathe: 1.1.2
|
||||
vite: 5.4.9(@types/node@20.16.13)(stylus@0.57.0)
|
||||
vite: 5.4.10(@types/node@20.17.1)(stylus@0.57.0)
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- less
|
||||
|
@ -5641,12 +5641,12 @@ snapshots:
|
|||
- prismjs
|
||||
- supports-color
|
||||
|
||||
vite-plugin-windicss@1.9.3(vite@5.4.9(@types/node@20.16.13)(stylus@0.57.0)):
|
||||
vite-plugin-windicss@1.9.3(vite@5.4.10(@types/node@20.17.1)(stylus@0.57.0)):
|
||||
dependencies:
|
||||
'@windicss/plugin-utils': 1.9.3
|
||||
debug: 4.3.7
|
||||
kolorist: 1.8.0
|
||||
vite: 5.4.9(@types/node@20.16.13)(stylus@0.57.0)
|
||||
vite: 5.4.10(@types/node@20.17.1)(stylus@0.57.0)
|
||||
windicss: 3.5.6
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
@ -5656,20 +5656,20 @@ snapshots:
|
|||
svgo: 3.3.2
|
||||
vue: 3.5.12(typescript@5.6.3)
|
||||
|
||||
vite@5.4.9(@types/node@20.16.13)(stylus@0.57.0):
|
||||
vite@5.4.10(@types/node@20.17.1)(stylus@0.57.0):
|
||||
dependencies:
|
||||
esbuild: 0.21.5
|
||||
postcss: 8.4.47
|
||||
rollup: 4.24.0
|
||||
optionalDependencies:
|
||||
'@types/node': 20.16.13
|
||||
'@types/node': 20.17.1
|
||||
fsevents: 2.3.3
|
||||
stylus: 0.57.0
|
||||
|
||||
vitest@2.1.3(@types/node@20.16.13)(jsdom@25.0.1)(stylus@0.57.0):
|
||||
vitest@2.1.3(@types/node@20.17.1)(jsdom@25.0.1)(stylus@0.57.0):
|
||||
dependencies:
|
||||
'@vitest/expect': 2.1.3
|
||||
'@vitest/mocker': 2.1.3(@vitest/spy@2.1.3)(vite@5.4.9(@types/node@20.16.13)(stylus@0.57.0))
|
||||
'@vitest/mocker': 2.1.3(@vitest/spy@2.1.3)(vite@5.4.10(@types/node@20.17.1)(stylus@0.57.0))
|
||||
'@vitest/pretty-format': 2.1.3
|
||||
'@vitest/runner': 2.1.3
|
||||
'@vitest/snapshot': 2.1.3
|
||||
|
@ -5684,11 +5684,11 @@ snapshots:
|
|||
tinyexec: 0.3.1
|
||||
tinypool: 1.0.1
|
||||
tinyrainbow: 1.2.0
|
||||
vite: 5.4.9(@types/node@20.16.13)(stylus@0.57.0)
|
||||
vite-node: 2.1.3(@types/node@20.16.13)(stylus@0.57.0)
|
||||
vite: 5.4.10(@types/node@20.17.1)(stylus@0.57.0)
|
||||
vite-node: 2.1.3(@types/node@20.17.1)(stylus@0.57.0)
|
||||
why-is-node-running: 2.3.0
|
||||
optionalDependencies:
|
||||
'@types/node': 20.16.13
|
||||
'@types/node': 20.17.1
|
||||
jsdom: 25.0.1
|
||||
transitivePeerDependencies:
|
||||
- less
|
||||
|
|
Loading…
Reference in a new issue