diff --git a/cmd/server/flags.go b/cmd/server/flags.go index 08cff58424..45631a3195 100644 --- a/cmd/server/flags.go +++ b/cmd/server/flags.go @@ -160,12 +160,6 @@ var flags = append([]cli.Flag{ Usage: "The maximum time in minutes you can set in the repo settings before a pipeline gets killed", Value: 120, }, - &cli.StringFlag{ - EnvVars: []string{"WOODPECKER_DOCS"}, - Name: "docs", - Usage: "link to user documentation", - Value: "https://woodpecker-ci.org/", - }, &cli.DurationFlag{ EnvVars: []string{"WOODPECKER_SESSION_EXPIRES"}, Name: "session-expires", diff --git a/cmd/server/server.go b/cmd/server/server.go index 6217319869..f6402180b9 100644 --- a/cmd/server/server.go +++ b/cmd/server/server.go @@ -332,7 +332,6 @@ func setupEvilGlobals(c *cli.Context, v store.Store, f forge.Forge) { } server.Config.Server.Port = c.String("server-addr") server.Config.Server.PortTLS = c.String("server-addr-tls") - server.Config.Server.Docs = c.String("docs") server.Config.Server.StatusContext = c.String("status-context") server.Config.Server.StatusContextFormat = c.String("status-context-format") server.Config.Server.SessionExpires = c.Duration("session-expires") diff --git a/docs/docs/30-administration/10-server-config.md b/docs/docs/30-administration/10-server-config.md index c6ae4b58d5..e3740338e1 100644 --- a/docs/docs/30-administration/10-server-config.md +++ b/docs/docs/30-administration/10-server-config.md @@ -346,12 +346,6 @@ Example: `user1,user2` Enable to allow user registration. -### `WOODPECKER_DOCS` - -> Default: `https://woodpecker-ci.org/` - -Link to documentation in the UI. - ### `WOODPECKER_AUTHENTICATE_PUBLIC_REPOS` > Default: `false` diff --git a/docs/docs/91-migrations.md b/docs/docs/91-migrations.md index 0ef75d7600..63f00aef96 100644 --- a/docs/docs/91-migrations.md +++ b/docs/docs/91-migrations.md @@ -13,6 +13,7 @@ Some versions need some changes to the server configuration or the pipeline conf - Removed `build` alias for `pipeline` command in CLI - Removed `ssh` backend. Use an agent directly on the SSH machine using the `local` backend. - Removed `/hook` and `/stream` API paths in favor of `/api/(hook|stream)`. You may need to use the "Repair repository" button in the repo settings or "Repair all" in the admin settings to recreate the forge hook. +- Removed `WOODPECKER_DOCS` config variable ## 1.0.0 diff --git a/docs/docs/92-awesome.md b/docs/docs/92-awesome.md index 9979202e21..7a5dcb3dd0 100644 --- a/docs/docs/92-awesome.md +++ b/docs/docs/92-awesome.md @@ -28,6 +28,7 @@ If you have some missing resources, please feel free to [open a pull-request](ht - [Ansible NAS](https://github.com/davestephens/ansible-nas/) - a homelab Ansible playbook that can set up Woodpecker-CI and Gitea - [picus](https://github.com/windsource/picus) - Picus connects to a Woodpecker CI server and creates an agent in the cloud when there are pending workflows. - [Hetzner cloud](https://www.hetzner.com/cloud) based [Woodpecker compatible autoscaler](https://git.ljoonal.xyz/ljoonal/hetzner-ci-autoscaler) - Creates and destroys VPS instances based on the count of pending & running jobs. +- [woodpecker-lint](https://git.schmidl.dev/schtobia/woodpecker-lint) - A repository for linting a woodpecker config file via pre-commit hook ## Configuration Services diff --git a/server/config.go b/server/config.go index d69b2d5ef4..3caa8f3eef 100644 --- a/server/config.go +++ b/server/config.go @@ -63,7 +63,6 @@ var Config = struct { Port string PortTLS string AgentToken string - Docs string StatusContext string StatusContextFormat string SessionExpires time.Duration diff --git a/server/web/config.go b/server/web/config.go index 20d37677a6..a68ac23498 100644 --- a/server/web/config.go +++ b/server/web/config.go @@ -42,7 +42,6 @@ func Config(c *gin.Context) { configData := map[string]interface{}{ "user": user, "csrf": csrf, - "docs": server.Config.Server.Docs, "version": version.String(), "forge": server.Config.Services.Forge.Name(), "root_path": server.Config.Server.RootPath, @@ -73,7 +72,6 @@ const configTemplate = ` window.WOODPECKER_USER = {{ json .user }}; window.WOODPECKER_CSRF = "{{ .csrf }}"; window.WOODPECKER_VERSION = "{{ .version }}"; -window.WOODPECKER_DOCS = "{{ .docs }}"; window.WOODPECKER_FORGE = "{{ .forge }}"; window.WOODPECKER_ROOT_PATH = "{{ .root_path }}"; window.WOODPECKER_ENABLE_SWAGGER = {{ .enable_swagger }}; diff --git a/web/src/components/atomic/DocsLink.vue b/web/src/components/atomic/DocsLink.vue index 340cd17423..f66eef8fa3 100644 --- a/web/src/components/atomic/DocsLink.vue +++ b/web/src/components/atomic/DocsLink.vue @@ -12,15 +12,13 @@ import { computed, toRef } from 'vue'; import Icon from '~/components/atomic/Icon.vue'; -import useConfig from '~/compositions/useConfig'; const props = defineProps<{ url: string; topic: string; }>(); -const docsBaseUrl = useConfig().docs; const url = toRef(props, 'url'); const topic = toRef(props, 'topic'); -const docsUrl = computed(() => (url.value.startsWith('http') ? url.value : `${docsBaseUrl}${url.value}`)); +const docsUrl = computed(() => (url.value.startsWith('http') ? url.value : `https://woodpecker-ci.org/${url.value}`)); diff --git a/web/src/components/layout/header/Navbar.vue b/web/src/components/layout/header/Navbar.vue index 3187dc8329..0f36f6f8bf 100644 --- a/web/src/components/layout/header/Navbar.vue +++ b/web/src/components/layout/header/Navbar.vue @@ -16,7 +16,9 @@ - +