Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prettier #2600

Merged
merged 9 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 10 additions & 20 deletions .changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,37 @@ service: github

# Changelog groups and which labeled PRs to add to each group
groups:
-
name: BREAKING
- name: BREAKING
labels:
- breaking
-
name: FEATURES
- name: FEATURES
labels:
- feature
-
name: SECURITY
- name: SECURITY
labels:
- security
-
name: BUGFIXES
- name: BUGFIXES
labels:
- bug
-
name: ENHANCEMENTS
- name: ENHANCEMENTS
labels:
- enhancement
- refactor
- ui
-
name: TESTING
- name: TESTING
labels:
- tests
-
name: TRANSLATION
- name: TRANSLATION
labels:
- kind/translation
-
name: BUILD
- name: BUILD
labels:
- kind/build
- kind/lint
-
name: DOCUMENTATION
- name: DOCUMENTATION
labels:
- documentation
-
name: MISC
- name: MISC
default: true

# regex indicating which labels to skip for the changelog
Expand Down
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ linters-settings:
misspell:
locale: US
gofumpt:
lang-version: "1.21"
lang-version: '1.21'
extra-rules: true
forbidigo:
forbid:
Expand Down Expand Up @@ -48,6 +48,6 @@ issues:
- revive

# let cli use print and panic
- path: "cmd/*|cli/*"
- path: 'cmd/*|cli/*'
linters:
- forbidigo
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pnpm-lock.yaml
build/
docs/versioned_docs/
docs/.docusaurus/
dist/
web/components.d.ts
CHANGELOG.md
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"trailingComma": "all",
"singleQuote": true,
anbraten marked this conversation as resolved.
Show resolved Hide resolved
"printWidth": 120,
"tabWidth": 2,
"endOfLine": "lf"
}
19 changes: 4 additions & 15 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
"compounds": [
{
"name": "Woodpecker CI",
"configurations": [
"Woodpecker UI",
"Woodpecker server",
"Woodpecker agent"
],
"configurations": ["Woodpecker UI", "Woodpecker server", "Woodpecker agent"],
"stopAll": true
}
],
Expand Down Expand Up @@ -43,17 +39,10 @@
"type": "node",
"request": "launch",
"runtimeExecutable": "pnpm",
"runtimeArgs": [
"start",
],
"runtimeArgs": ["start"],
"cwd": "${workspaceFolder}/web",
"resolveSourceMapLocations": [
"${workspaceFolder}/web/**",
"!**/node_modules/**"
],
"skipFiles": [
"<node_internals>/**"
]
"resolveSourceMapLocations": ["${workspaceFolder}/web/**", "!**/node_modules/**"],
"skipFiles": ["<node_internals>/**"]
}
]
}
16 changes: 4 additions & 12 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,10 @@
"**/*.code-search": true,
"vendor/": true
},
"go.lintTool":"golangci-lint",
"go.lintFlags": [
"--fast"
],
"eslint.workingDirectories": [
"./web"
],
"go.lintTool": "golangci-lint",
"go.lintFlags": ["--fast"],
"eslint.workingDirectories": ["./web"],
"prettier.configPath": "./web/.prettierrc.js",
"prettier.ignorePath": "./web/.prettierignore",
"cSpell.words": [
"Curr",
"doublestar",
"multierr"
]
"cSpell.words": ["Curr", "doublestar", "multierr"]
}
4 changes: 2 additions & 2 deletions .woodpecker/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ steps:
release-dryrun:
image: *golang_image
commands:
- ls -la dist/*.*
- cat dist/checksums.txt
- ls -la dist/*.*
- cat dist/checksums.txt

release:
image: plugins/github-release
Expand Down
35 changes: 17 additions & 18 deletions .woodpecker/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ variables:
- &build_args 'CI_COMMIT_SHA=${CI_COMMIT_SHA},CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH},CI_COMMIT_TAG=${CI_COMMIT_TAG}'

# vars used on push / tag events only
- publish_logins: &publish_logins
# Default DockerHub login
- publish_logins: &publish_logins # Default DockerHub login
- registry: https://index.docker.io/v1/
username:
from_secret: docker_username
Expand Down Expand Up @@ -72,7 +71,7 @@ steps:

publish-server-preview:
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_username, docker_password ]
secrets: [docker_username, docker_password]
group: docker
settings:
repo: woodpeckerci/woodpecker-server
Expand All @@ -84,7 +83,7 @@ steps:

publish-server-alpine-preview:
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_username, docker_password ]
secrets: [docker_username, docker_password]
group: docker
settings:
repo: woodpeckerci/woodpecker-server
Expand Down Expand Up @@ -118,7 +117,7 @@ steps:
repo: *publish_repos_server
dockerfile: docker/Dockerfile.server.multiarch
platforms: *platforms_server
tag: [next, "next-${CI_COMMIT_SHA:0:10}"]
tag: [next, 'next-${CI_COMMIT_SHA:0:10}']
logins: *publish_logins
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
Expand All @@ -131,7 +130,7 @@ steps:
repo: *publish_repos_server
dockerfile: docker/Dockerfile.server.alpine.multiarch
platforms: *platforms_alpine
tag: [next-alpine, "next-${CI_COMMIT_SHA:0:10}-alpine"]
tag: [next-alpine, 'next-${CI_COMMIT_SHA:0:10}-alpine']
logins: *publish_logins
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
Expand Down Expand Up @@ -171,7 +170,7 @@ steps:
dockerfile: docker/Dockerfile.server.multiarch
platforms: *platforms_server
# remove 'latest' on older version branches to avoid accidental downgrade
tag: [latest, "${CI_COMMIT_TAG}"]
tag: [latest, '${CI_COMMIT_TAG}']
logins: *publish_logins
when:
event: tag
Expand All @@ -184,7 +183,7 @@ steps:
dockerfile: docker/Dockerfile.server.alpine.multiarch
platforms: *platforms_alpine
# remove 'latest-alpine' on older version branches to avoid accidental downgrade
tag: [latest-alpine, "${CI_COMMIT_TAG}-alpine"]
tag: [latest-alpine, '${CI_COMMIT_TAG}-alpine']
logins: *publish_logins
when:
event: tag
Expand All @@ -196,7 +195,7 @@ steps:
publish-agent-preview:
group: docker
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_username, docker_password ]
secrets: [docker_username, docker_password]
settings:
repo: woodpeckerci/woodpecker-agent
dockerfile: docker/Dockerfile.agent.multiarch
Expand All @@ -213,7 +212,7 @@ steps:
repo: *publish_repos_agent
dockerfile: docker/Dockerfile.agent.multiarch
platforms: *platforms_release
tag: [next, "next-${CI_COMMIT_SHA:0:10}"]
tag: [next, 'next-${CI_COMMIT_SHA:0:10}']
logins: *publish_logins
build_args: *build_args
when:
Expand All @@ -227,7 +226,7 @@ steps:
repo: *publish_repos_agent
dockerfile: docker/Dockerfile.agent.alpine.multiarch
platforms: *platforms_alpine
tag: [next-alpine, "next-${CI_COMMIT_SHA:0:10}-alpine"]
tag: [next-alpine, 'next-${CI_COMMIT_SHA:0:10}-alpine']
logins: *publish_logins
build_args: *build_args
when:
Expand Down Expand Up @@ -270,7 +269,7 @@ steps:
dockerfile: docker/Dockerfile.agent.multiarch
platforms: *platforms_release
# remove 'latest' on older version branches to avoid accidental downgrade
tag: [latest, "${CI_COMMIT_TAG}"]
tag: [latest, '${CI_COMMIT_TAG}']
logins: *publish_logins
build_args: *build_args
when:
Expand All @@ -284,7 +283,7 @@ steps:
dockerfile: docker/Dockerfile.agent.alpine.multiarch
platforms: *platforms_alpine
# remove 'latest-alpine' on older version branches to avoid accidental downgrade
tag: [latest-alpine, "${CI_COMMIT_TAG}-alpine"]
tag: [latest-alpine, '${CI_COMMIT_TAG}-alpine']
logins: *publish_logins
build_args: *build_args
when:
Expand All @@ -297,7 +296,7 @@ steps:
publish-cli-preview:
group: docker
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_username, docker_password ]
secrets: [docker_username, docker_password]
settings:
repo: woodpeckerci/woodpecker-cli
dockerfile: docker/Dockerfile.cli.multiarch
Expand All @@ -314,7 +313,7 @@ steps:
repo: *publish_repos_cli
dockerfile: docker/Dockerfile.cli.multiarch
platforms: *platforms_release
tag: [next, "next-${CI_COMMIT_SHA:0:10}"]
tag: [next, 'next-${CI_COMMIT_SHA:0:10}']
logins: *publish_logins
build_args: *build_args
when:
Expand All @@ -328,7 +327,7 @@ steps:
repo: *publish_repos_cli
dockerfile: docker/Dockerfile.cli.alpine.multiarch
platforms: *platforms_alpine
tag: [next-alpine, "next-${CI_COMMIT_SHA:0:10}-alpine"]
tag: [next-alpine, 'next-${CI_COMMIT_SHA:0:10}-alpine']
logins: *publish_logins
build_args: *build_args
when:
Expand Down Expand Up @@ -371,7 +370,7 @@ steps:
dockerfile: docker/Dockerfile.cli.multiarch
platforms: *platforms_release
# remove 'latest' on older version branches to avoid accidental downgrade
tag: [latest, "${CI_COMMIT_TAG}"]
tag: [latest, '${CI_COMMIT_TAG}']
logins: *publish_logins
build_args: *build_args
when:
Expand All @@ -385,7 +384,7 @@ steps:
dockerfile: docker/Dockerfile.cli.alpine.multiarch
platforms: *platforms_alpine
# remove 'latest-alpine' on older version branches to avoid accidental downgrade
tag: [latest-alpine, "${CI_COMMIT_TAG}-alpine"]
tag: [latest-alpine, '${CI_COMMIT_TAG}-alpine']
logins: *publish_logins
build_args: *build_args
when:
Expand Down
14 changes: 7 additions & 7 deletions .woodpecker/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ when:
- event: pull_request
- event: push
path: &when_path
- "docs/**"
- ".woodpecker/docs.yml"
- 'docs/**'
- '.woodpecker/docs.yml'
# since we generate docs for cli tool we have to watch this too
- "cli/**"
- "cmd/cli/**"
- 'cli/**'
- 'cmd/cli/**'
# api docs
- "server/api/**"
- 'server/api/**'
branch: ${CI_REPO_DEFAULT_BRANCH}
- cron: update_docs
event: cron
Expand Down Expand Up @@ -40,11 +40,11 @@ steps:
deploy-preview:
image: woodpeckerci/plugin-surge-preview:1.2.2
settings:
path: "docs/build/"
path: 'docs/build/'
surge_token:
from_secret: SURGE_TOKEN
forge_type: github
forge_url: "https://github.com"
forge_url: 'https://github.com'
forge_repo_token:
from_secret: GITHUB_TOKEN_SURGE
failure: ignore
Expand Down
6 changes: 3 additions & 3 deletions .woodpecker/securityscan.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
when:
- event: [ pull_request, cron ]
- event: [pull_request, cron]
- event: push
branch:
- ${CI_REPO_DEFAULT_BRANCH}
Expand All @@ -21,7 +21,7 @@ steps:
image: *trivy_plugin
settings:
skip-dirs: node_modules/,plugins/woodpecker-plugins/node_modules/
dir: docs/
dir: docs/
when:
event: [pull_request, push, cron]
branch: ${CI_REPO_DEFAULT_BRANCH}
Expand All @@ -31,4 +31,4 @@ steps:
image: *trivy_plugin
settings:
skip-dirs: node_modules/
dir: web/
dir: web/
Loading