mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-08-07 05:08:10 +00:00
Remove WOODPECKER_DOCS
config (#2647)
This commit is contained in:
parent
70531821bf
commit
aeb7bcb26a
@ -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",
|
Usage: "The maximum time in minutes you can set in the repo settings before a pipeline gets killed",
|
||||||
Value: 120,
|
Value: 120,
|
||||||
},
|
},
|
||||||
&cli.StringFlag{
|
|
||||||
EnvVars: []string{"WOODPECKER_DOCS"},
|
|
||||||
Name: "docs",
|
|
||||||
Usage: "link to user documentation",
|
|
||||||
Value: "https://woodpecker-ci.org/",
|
|
||||||
},
|
|
||||||
&cli.DurationFlag{
|
&cli.DurationFlag{
|
||||||
EnvVars: []string{"WOODPECKER_SESSION_EXPIRES"},
|
EnvVars: []string{"WOODPECKER_SESSION_EXPIRES"},
|
||||||
Name: "session-expires",
|
Name: "session-expires",
|
||||||
|
@ -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.Port = c.String("server-addr")
|
||||||
server.Config.Server.PortTLS = c.String("server-addr-tls")
|
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.StatusContext = c.String("status-context")
|
||||||
server.Config.Server.StatusContextFormat = c.String("status-context-format")
|
server.Config.Server.StatusContextFormat = c.String("status-context-format")
|
||||||
server.Config.Server.SessionExpires = c.Duration("session-expires")
|
server.Config.Server.SessionExpires = c.Duration("session-expires")
|
||||||
|
@ -346,12 +346,6 @@ Example: `user1,user2`
|
|||||||
|
|
||||||
Enable to allow user registration.
|
Enable to allow user registration.
|
||||||
|
|
||||||
### `WOODPECKER_DOCS`
|
|
||||||
|
|
||||||
> Default: `https://woodpecker-ci.org/`
|
|
||||||
|
|
||||||
Link to documentation in the UI.
|
|
||||||
|
|
||||||
### `WOODPECKER_AUTHENTICATE_PUBLIC_REPOS`
|
### `WOODPECKER_AUTHENTICATE_PUBLIC_REPOS`
|
||||||
|
|
||||||
> Default: `false`
|
> Default: `false`
|
||||||
|
@ -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 `build` alias for `pipeline` command in CLI
|
||||||
- Removed `ssh` backend. Use an agent directly on the SSH machine using the `local` backend.
|
- 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 `/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
|
## 1.0.0
|
||||||
|
|
||||||
|
@ -63,7 +63,6 @@ var Config = struct {
|
|||||||
Port string
|
Port string
|
||||||
PortTLS string
|
PortTLS string
|
||||||
AgentToken string
|
AgentToken string
|
||||||
Docs string
|
|
||||||
StatusContext string
|
StatusContext string
|
||||||
StatusContextFormat string
|
StatusContextFormat string
|
||||||
SessionExpires time.Duration
|
SessionExpires time.Duration
|
||||||
|
@ -42,7 +42,6 @@ func Config(c *gin.Context) {
|
|||||||
configData := map[string]interface{}{
|
configData := map[string]interface{}{
|
||||||
"user": user,
|
"user": user,
|
||||||
"csrf": csrf,
|
"csrf": csrf,
|
||||||
"docs": server.Config.Server.Docs,
|
|
||||||
"version": version.String(),
|
"version": version.String(),
|
||||||
"forge": server.Config.Services.Forge.Name(),
|
"forge": server.Config.Services.Forge.Name(),
|
||||||
"root_path": server.Config.Server.RootPath,
|
"root_path": server.Config.Server.RootPath,
|
||||||
@ -73,7 +72,6 @@ const configTemplate = `
|
|||||||
window.WOODPECKER_USER = {{ json .user }};
|
window.WOODPECKER_USER = {{ json .user }};
|
||||||
window.WOODPECKER_CSRF = "{{ .csrf }}";
|
window.WOODPECKER_CSRF = "{{ .csrf }}";
|
||||||
window.WOODPECKER_VERSION = "{{ .version }}";
|
window.WOODPECKER_VERSION = "{{ .version }}";
|
||||||
window.WOODPECKER_DOCS = "{{ .docs }}";
|
|
||||||
window.WOODPECKER_FORGE = "{{ .forge }}";
|
window.WOODPECKER_FORGE = "{{ .forge }}";
|
||||||
window.WOODPECKER_ROOT_PATH = "{{ .root_path }}";
|
window.WOODPECKER_ROOT_PATH = "{{ .root_path }}";
|
||||||
window.WOODPECKER_ENABLE_SWAGGER = {{ .enable_swagger }};
|
window.WOODPECKER_ENABLE_SWAGGER = {{ .enable_swagger }};
|
||||||
|
@ -12,15 +12,13 @@
|
|||||||
import { computed, toRef } from 'vue';
|
import { computed, toRef } from 'vue';
|
||||||
|
|
||||||
import Icon from '~/components/atomic/Icon.vue';
|
import Icon from '~/components/atomic/Icon.vue';
|
||||||
import useConfig from '~/compositions/useConfig';
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
url: string;
|
url: string;
|
||||||
topic: string;
|
topic: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const docsBaseUrl = useConfig().docs;
|
|
||||||
const url = toRef(props, 'url');
|
const url = toRef(props, 'url');
|
||||||
const topic = toRef(props, 'topic');
|
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}`));
|
||||||
</script>
|
</script>
|
||||||
|
@ -16,7 +16,9 @@
|
|||||||
<span class="hidden md:flex">{{ $t('repositories') }}</span>
|
<span class="hidden md:flex">{{ $t('repositories') }}</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
<!-- Docs Link -->
|
<!-- Docs Link -->
|
||||||
<a :href="docsUrl" target="_blank" class="navbar-link navbar-clickable hidden md:flex">{{ $t('docs') }}</a>
|
<a href="https://woodpecker-ci.org/" target="_blank" class="navbar-link navbar-clickable hidden md:flex">{{
|
||||||
|
$t('docs')
|
||||||
|
}}</a>
|
||||||
<!-- API Link -->
|
<!-- API Link -->
|
||||||
<a v-if="enableSwagger" :href="apiUrl" target="_blank" class="navbar-link navbar-clickable hidden md:flex">{{
|
<a v-if="enableSwagger" :href="apiUrl" target="_blank" class="navbar-link navbar-clickable hidden md:flex">{{
|
||||||
$t('api')
|
$t('api')
|
||||||
@ -69,7 +71,6 @@ const route = useRoute();
|
|||||||
const authentication = useAuthentication();
|
const authentication = useAuthentication();
|
||||||
const { user } = authentication;
|
const { user } = authentication;
|
||||||
const { darkMode } = useDarkMode();
|
const { darkMode } = useDarkMode();
|
||||||
const docsUrl = config.docs || undefined;
|
|
||||||
const apiUrl = `${config.rootPath ?? ''}/swagger/index.html`;
|
const apiUrl = `${config.rootPath ?? ''}/swagger/index.html`;
|
||||||
|
|
||||||
function doLogin() {
|
function doLogin() {
|
||||||
|
@ -3,7 +3,6 @@ import { User } from '~/lib/api/types';
|
|||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
WOODPECKER_USER: User | undefined;
|
WOODPECKER_USER: User | undefined;
|
||||||
WOODPECKER_DOCS: string | undefined;
|
|
||||||
WOODPECKER_VERSION: string | undefined;
|
WOODPECKER_VERSION: string | undefined;
|
||||||
WOODPECKER_CSRF: string | undefined;
|
WOODPECKER_CSRF: string | undefined;
|
||||||
WOODPECKER_FORGE: 'github' | 'gitlab' | 'gitea' | 'bitbucket' | undefined;
|
WOODPECKER_FORGE: 'github' | 'gitlab' | 'gitea' | 'bitbucket' | undefined;
|
||||||
@ -14,7 +13,6 @@ declare global {
|
|||||||
|
|
||||||
export default () => ({
|
export default () => ({
|
||||||
user: window.WOODPECKER_USER || null,
|
user: window.WOODPECKER_USER || null,
|
||||||
docs: window.WOODPECKER_DOCS || null,
|
|
||||||
version: window.WOODPECKER_VERSION,
|
version: window.WOODPECKER_VERSION,
|
||||||
csrf: window.WOODPECKER_CSRF || null,
|
csrf: window.WOODPECKER_CSRF || null,
|
||||||
forge: window.WOODPECKER_FORGE || null,
|
forge: window.WOODPECKER_FORGE || null,
|
||||||
|
Loading…
Reference in New Issue
Block a user