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 8 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
59 changes: 28 additions & 31 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: woodpeckerbot
password:
Expand All @@ -35,19 +34,17 @@ variables:
- &publish_repos_server 'woodpeckerci/woodpecker-server,quay.io/woodpeckerci/woodpecker-server'
- &publish_repos_agent 'woodpeckerci/woodpecker-agent,quay.io/woodpeckerci/woodpecker-agent'
- &publish_repos_cli 'woodpeckerci/woodpecker-cli,quay.io/woodpeckerci/woodpecker-cli'
- path: &when_path
# web source code
- "web/**"
- path: &when_path # web source code
- 'web/**'
# api source code
- "server/api/**"
- 'server/api/**'
# go source code
- "**/*.go"
- "go.*"
- '**/*.go'
- 'go.*'
# schema changes
- "pipeline/schema/**"
- 'pipeline/schema/**'
# Dockerfile changes
- "docker/**"

- 'docker/**'

steps:
vendor:
Expand Down Expand Up @@ -106,7 +103,7 @@ steps:

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

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

publish-server-preview-dry:
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_password ]
secrets: [docker_password]
group: docker
settings:
dry_run: true
Expand All @@ -147,7 +144,7 @@ steps:

publish-server-alpine-preview-dry:
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_password ]
secrets: [docker_password]
group: docker
settings:
dry_run: true
Expand Down Expand Up @@ -185,7 +182,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 @@ -199,7 +196,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 @@ -242,7 +239,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 @@ -255,7 +252,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 @@ -267,7 +264,7 @@ steps:
publish-agent-preview:
group: docker
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_password ]
secrets: [docker_password]
settings:
repo: woodpeckerci/woodpecker-agent
dockerfile: docker/Dockerfile.agent.multiarch
Expand All @@ -281,7 +278,7 @@ steps:
publish-agent-preview-dry:
group: docker
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_password ]
secrets: [docker_password]
settings:
dry_run: true
repo: woodpeckerci/woodpecker-agent
Expand All @@ -301,7 +298,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 @@ -316,7 +313,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 @@ -362,7 +359,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 @@ -376,7 +373,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 @@ -389,7 +386,7 @@ steps:
publish-cli-preview:
group: docker
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_password ]
secrets: [docker_password]
settings:
repo: woodpeckerci/woodpecker-cli
dockerfile: docker/Dockerfile.cli.multiarch
Expand All @@ -403,7 +400,7 @@ steps:
publish-cli-preview-dry:
group: docker
image: woodpeckerci/plugin-docker-buildx:2.1.0
secrets: [ docker_password ]
secrets: [docker_password]
settings:
dry_run: true
repo: woodpeckerci/woodpecker-cli
Expand All @@ -423,7 +420,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 @@ -438,7 +435,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 @@ -484,7 +481,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 @@ -498,7 +495,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
Loading