Skip to content

Commit

Permalink
Merge branch 'main' into local-backend/fix-windows-cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 committed Oct 25, 2023
2 parents 0f48c4c + aeb7bcb commit 48edc39
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 23 deletions.
6 changes: 0 additions & 6 deletions cmd/server/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion cmd/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
6 changes: 0 additions & 6 deletions docs/docs/30-administration/10-server-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
1 change: 1 addition & 0 deletions docs/docs/91-migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions docs/docs/92-awesome.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ var Config = struct {
Port string
PortTLS string
AgentToken string
Docs string
StatusContext string
StatusContextFormat string
SessionExpires time.Duration
Expand Down
2 changes: 0 additions & 2 deletions server/web/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 }};
Expand Down
4 changes: 1 addition & 3 deletions web/src/components/atomic/DocsLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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}`));
</script>
5 changes: 3 additions & 2 deletions web/src/components/layout/header/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
<span class="hidden md:flex">{{ $t('repositories') }}</span>
</router-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 -->
<a v-if="enableSwagger" :href="apiUrl" target="_blank" class="navbar-link navbar-clickable hidden md:flex">{{
$t('api')
Expand Down Expand Up @@ -69,7 +71,6 @@ const route = useRoute();
const authentication = useAuthentication();
const { user } = authentication;
const { darkMode } = useDarkMode();
const docsUrl = config.docs || undefined;
const apiUrl = `${config.rootPath ?? ''}/swagger/index.html`;
function doLogin() {
Expand Down
2 changes: 0 additions & 2 deletions web/src/compositions/useConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { User } from '~/lib/api/types';
declare global {
interface Window {
WOODPECKER_USER: User | undefined;
WOODPECKER_DOCS: string | undefined;
WOODPECKER_VERSION: string | undefined;
WOODPECKER_CSRF: string | undefined;
WOODPECKER_FORGE: 'github' | 'gitlab' | 'gitea' | 'bitbucket' | undefined;
Expand All @@ -14,7 +13,6 @@ declare global {

export default () => ({
user: window.WOODPECKER_USER || null,
docs: window.WOODPECKER_DOCS || null,
version: window.WOODPECKER_VERSION,
csrf: window.WOODPECKER_CSRF || null,
forge: window.WOODPECKER_FORGE || null,
Expand Down

0 comments on commit 48edc39

Please sign in to comment.