Skip to content

Commit 59405ea

Browse files
authored
Initial commit
0 parents  commit 59405ea

26 files changed

+2119
-0
lines changed

.github/CODEOWNERS

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Define code owners (individuals or teams that are responsible for code in this repository)
2+
# More about code owners at https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
3+
* @ConduitIO/conduit-core
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: 🚀 Feature Request
2+
description: Request a new feature.
3+
title: "Feature: <title>"
4+
labels: [feature, triage]
5+
body:
6+
- type: textarea
7+
attributes:
8+
label: Feature description
9+
description: A clear and concise description of what you want to happen and what problem will this solve.
10+
validations:
11+
required: true

.github/ISSUE_TEMPLATE/2-bug.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: 🐛 Bug
2+
description: Report a bug.
3+
title: "Bug: <title>"
4+
labels: [bug, triage]
5+
body:
6+
- type: textarea
7+
attributes:
8+
label: Bug description
9+
description: A concise description of what you're experiencing and what you expected to happen instead.
10+
validations:
11+
required: true
12+
- type: textarea
13+
attributes:
14+
label: Steps to reproduce
15+
description: Steps to reproduce the behavior.
16+
placeholder: |
17+
1. In this environment...
18+
2. With this config...
19+
3. Run '...'
20+
4. See error...
21+
validations:
22+
required: true
23+
- type: input
24+
attributes:
25+
label: Version
26+
description: "Version of processor"
27+
placeholder: v0.1.0 darwin/amd64
28+
validations:
29+
required: true

.github/ISSUE_TEMPLATE/config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: true

.github/dependabot.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Docs: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
5+
# Maintain dependencies for GitHub Actions
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
interval: "daily"
10+
commit-message:
11+
prefix: ".github:"
12+
13+
# Maintain dependencies for Go
14+
- package-ecosystem: "gomod"
15+
directory: "/"
16+
schedule:
17+
interval: "daily"
18+
commit-message:
19+
prefix: "go.mod:"

.github/pull_request_template.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### Description
2+
3+
Please include a summary of the change and what type of change it is (new feature, bug fix, refactoring, documentation).
4+
Please also include relevant motivation and context.
5+
List any dependencies that are required for this change.
6+
7+
Fixes # (issue)
8+
9+
### Quick checks:
10+
11+
- [ ] There is no other [pull request](https://github.com/conduitio/conduit-processor-processorname/pulls) for the same update/change.
12+
- [ ] I have written unit tests.
13+
- [ ] I have made sure that the PR is of reasonable size and can be easily reviewed.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This action automatically merges dependabot PRs that update go dependencies (only patch and minor updates).
2+
# Based on: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions#enable-auto-merge-on-a-pull-request
3+
4+
name: Dependabot auto-merge
5+
on:
6+
pull_request:
7+
# Run this action when dependabot labels the PR, we care about the 'go' label.
8+
types: [labeled]
9+
10+
permissions:
11+
pull-requests: write
12+
contents: write
13+
14+
jobs:
15+
dependabot-go:
16+
runs-on: ubuntu-latest
17+
if: ${{ github.actor == 'dependabot[bot]' && contains(github.event.pull_request.labels.*.name, 'go') }}
18+
steps:
19+
- name: Dependabot metadata
20+
id: metadata
21+
uses: dependabot/[email protected]
22+
with:
23+
github-token: "${{ secrets.GITHUB_TOKEN }}"
24+
25+
- name: Approve PR
26+
# Approve only patch and minor updates
27+
if: ${{ steps.metadata.outputs.update-type != 'version-update:semver-major' }}
28+
run: gh pr review --approve "$PR_URL"
29+
env:
30+
PR_URL: ${{ github.event.pull_request.html_url }}
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Enable auto-merge for Dependabot PRs
34+
# Enable auto-merging only for patch and minor updates
35+
if: ${{ steps.metadata.outputs.update-type != 'version-update:semver-major' }}
36+
run: gh pr merge --auto --squash "$PR_URL"
37+
env:
38+
PR_URL: ${{ github.event.pull_request.html_url }}
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/lint.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: lint
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
8+
jobs:
9+
golangci-lint:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-go@v5
14+
with:
15+
go-version-file: 'go.mod'
16+
17+
# This step sets up the variable steps.golangci-lint-version.outputs.v
18+
# to contain the version of golangci-lint (e.g. v1.54.2).
19+
# The version is taken from go.mod.
20+
- name: Golangci-lint version
21+
id: golangci-lint-version
22+
run: |
23+
GOLANGCI_LINT_VERSION=$( go list -m -f '{{.Version}}' github.com/golangci/golangci-lint )
24+
echo "v=$GOLANGCI_LINT_VERSION" >> "$GITHUB_OUTPUT"
25+
- name: golangci-lint
26+
uses: golangci/golangci-lint-action@v6
27+
with:
28+
version: ${{ steps.golangci-lint-version.outputs.v }}

.github/workflows/release.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
name: Release
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Set up Go
22+
uses: actions/setup-go@v5
23+
with:
24+
go-version-file: 'go.mod'
25+
26+
- name: Run GoReleaser
27+
uses: goreleaser/goreleaser-action@v6
28+
with:
29+
distribution: goreleaser
30+
version: latest
31+
args: release
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Set up Go
15+
uses: actions/setup-go@v5
16+
with:
17+
go-version-file: 'go.mod'
18+
19+
- name: Test
20+
run: make test GOTEST_FLAGS="-v -count=1"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: validate-generated-files
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
8+
jobs:
9+
validate-generated-files:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Set up Go
15+
uses: actions/setup-go@v5
16+
with:
17+
go-version-file: 'go.mod'
18+
19+
- name: Check generated files
20+
run: |
21+
export PATH=$PATH:$(go env GOPATH)/bin
22+
make install-tools generate
23+
git diff --exit-code --numstat

.gitignore

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
### Go ###
2+
# Binaries for programs and plugins
3+
*.exe
4+
*.exe~
5+
*.dll
6+
*.so
7+
*.dylib
8+
*.wasm
9+
/vendor
10+
11+
# Test binary, built with `go test -c`
12+
*.test
13+
14+
# Output of the go coverage tool, specifically when used with LiteIDE
15+
*.out
16+
17+
### Intellij ###
18+
.idea
19+
20+
### VisualStudioCode ###
21+
.vscode
22+
23+
# Binary, built with `make build`
24+
/conduit-processor-processorname.wasm
25+
26+
### OS ###
27+
.DS_Store
28+
29+

.golangci.yml

+120
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
run:
2+
timeout: 5m
3+
4+
linters-settings:
5+
nolintlint:
6+
allow-unused: false # report any unused nolint directives
7+
require-explanation: true # require an explanation for nolint directives
8+
require-specific: true # require nolint directives to mention the specific linter being suppressed
9+
goconst:
10+
ignore-tests: true
11+
wrapcheck:
12+
ignoreSigs:
13+
- .Errorf(
14+
- errors.New(
15+
- errors.Unwrap(
16+
- errors.Join(
17+
- .Wrap(
18+
- .Wrapf(
19+
- .WithMessage(
20+
- .WithMessagef(
21+
- .WithStack(
22+
- (context.Context).Err()
23+
24+
issues:
25+
exclude-rules:
26+
- path: _test\.go
27+
linters:
28+
- dogsled
29+
- gosec
30+
- gocognit
31+
- errcheck
32+
- forcetypeassert
33+
- funlen
34+
- err113
35+
- dupl
36+
- maintidx
37+
38+
linters:
39+
# please, do not use `enable-all`: it's deprecated and will be removed soon.
40+
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
41+
disable-all: true
42+
enable:
43+
- asasalint
44+
- asciicheck
45+
- bidichk
46+
- bodyclose
47+
- containedctx
48+
- contextcheck
49+
- copyloopvar
50+
- decorder
51+
# - depguard
52+
- dogsled
53+
- dupl
54+
- dupword
55+
- durationcheck
56+
- errcheck
57+
- errchkjson
58+
- errname
59+
- errorlint
60+
- exhaustive
61+
# - forbidigo
62+
- forcetypeassert
63+
- funlen
64+
- gci
65+
- ginkgolinter
66+
- gocheckcompilerdirectives
67+
- gochecknoinits
68+
- gocognit
69+
- goconst
70+
- gocritic
71+
- godot
72+
- err113
73+
- gofmt
74+
- gofumpt
75+
- goheader
76+
- goimports
77+
- gomoddirectives
78+
- goprintffuncname
79+
- gosec
80+
- gosimple
81+
- gosmopolitan
82+
- govet
83+
- grouper
84+
- importas
85+
- ineffassign
86+
- interfacebloat
87+
# - ireturn # Doesn't have correct support for generic types https://github.com/butuzov/ireturn/issues/37
88+
- loggercheck
89+
- maintidx
90+
- makezero
91+
- mirror
92+
- misspell
93+
- musttag
94+
- nakedret
95+
- nestif
96+
- nilerr
97+
- nilnil
98+
- noctx
99+
- nolintlint
100+
- nosprintfhostport
101+
- prealloc
102+
- predeclared
103+
- promlinter
104+
- reassign
105+
- revive
106+
- rowserrcheck
107+
- sqlclosecheck
108+
- staticcheck
109+
- stylecheck
110+
- tenv
111+
- testableexamples
112+
- thelper
113+
- unconvert
114+
- unparam
115+
- unused
116+
- usestdlibvars
117+
- wastedassign
118+
- whitespace
119+
- wrapcheck
120+
- zerologlint

0 commit comments

Comments
 (0)