Skip to content

Commit 899e833

Browse files
committed
init repo
1 parent 07b8c13 commit 899e833

File tree

5,994 files changed

+1789555
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,994 files changed

+1789555
-0
lines changed

Diff for: .github/PULL_REQUEST_TEMPLATE.md

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<!-- Thank you for contributing to Karbour!
2+
3+
Note:
4+
5+
1. With pull requests:
6+
7+
- Open your pull request against "main"
8+
- Your pull request should have no more than three commits, if not you should squash them.
9+
- It should pass all tests in the available continuous integration systems such as GitHub Actions.
10+
- You should add/modify tests to cover your proposed code changes.
11+
- If your pull request contains a new feature, please document it on the README.
12+
13+
2. Please create an issue first to describe the problem.
14+
15+
We recommend that link the issue with the PR in the following question.
16+
For more info, check https://kusionstack.io/docs/governance/contribute/
17+
-->
18+
19+
## What type of PR is this?
20+
21+
<!--
22+
Add one of the following kinds:
23+
/kind bug
24+
/kind cleanup
25+
/kind documentation
26+
/kind feature
27+
/kind chore
28+
-->
29+
30+
## What this PR does / why we need it:
31+
32+
## Which issue(s) this PR fixes:
33+
34+
<!--
35+
*Automatically closes linked issue when PR is merged.
36+
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
37+
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
38+
-->
39+
40+
Fixes #
41+
42+
## Special notes for your reviewer:
43+
44+
### Does this PR introduce a user-facing change?
45+
46+
<!--
47+
If no, just write "NONE" in the release-note block below.
48+
If yes, a release note is required:
49+
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
50+
51+
-->
52+
53+
```release-note
54+
55+
```
56+
57+
### Additional documentation e.g., design docs, usage docs, etc.:
58+
59+
<!--
60+
Please use the following format for linking documentation:
61+
- [Design]: <link>
62+
- [Usage]: <link>
63+
- [Other doc]: <link>
64+
-->
65+
66+
```docs
67+
68+
```

Diff for: .github/workflows/check.yaml

+133
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Reference from:
2+
# https://github.com/c-bata/go-prompt/blob/master/.github/workflows/test.yml
3+
name: Check
4+
on:
5+
pull_request:
6+
branches:
7+
- main
8+
push:
9+
branches:
10+
- main
11+
jobs:
12+
Test:
13+
name: Unit Test
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
- name: Set up Go 1.19
21+
uses: actions/setup-go@v2
22+
with:
23+
go-version: 1.19
24+
25+
- run: go build ./...
26+
- run: go vet ./...
27+
28+
- name: Running go tests with coverage
29+
env:
30+
GO111MODULE: on
31+
run: make cover
32+
# - name: Send coverage
33+
# uses: shogo82148/actions-goveralls@v1
34+
# with:
35+
# path-to-profile: coverage.out
36+
37+
GolangLint:
38+
name: Golang Lint
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v3
43+
with:
44+
fetch-depth: 0
45+
- name: Set up Go 1.19
46+
uses: actions/setup-go@v2
47+
with:
48+
go-version: 1.19
49+
- name: golangci-lint
50+
uses: golangci/golangci-lint-action@v3
51+
with:
52+
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
53+
version: latest
54+
55+
# Lints Pull Request commits with commitlint.
56+
#
57+
# Rules can be referenced:
58+
# https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional
59+
# CommitLint:
60+
# name: Commit Lint
61+
# runs-on: ubuntu-latest
62+
# if: contains(fromJSON('["pull_request"]'), github.event_name)
63+
# steps:
64+
# - name: Checkout
65+
# uses: actions/checkout@v3
66+
# with:
67+
# fetch-depth: 0
68+
# - uses: wagoid/commitlint-github-action@v5
69+
70+
# Lints Pull Request title, because the title will be used as the
71+
# commit message in branch main.
72+
#
73+
# Configuration detail can be referenced:
74+
# https://github.com/marketplace/actions/pull-request-title-rules
75+
76+
# PullRequestTitleLint:
77+
# name: Pull Request Title Lint
78+
# runs-on: ubuntu-latest
79+
# if: contains(fromJSON('["pull_request"]'), github.event_name)
80+
# steps:
81+
# - uses: deepakputhraya/action-pr-title@master
82+
# with:
83+
# allowed_prefixes: 'build,chore,ci,docs,feat,fix,perf,refactor,revert,style,test' # title should start with the given prefix
84+
# disallowed_prefixes: 'WIP,[WIP]' # title should not start with the given prefix
85+
# prefix_case_sensitive: false # title prefix are case insensitive
86+
# min_length: 5 # Min length of the title
87+
# max_length: 80 # Max length of the title
88+
# github_token: ${{ github.token }} # Default: ${{ github.token }}
89+
90+
LicenseCheck:
91+
name: License Check
92+
runs-on: ubuntu-latest
93+
env:
94+
TERM: xterm
95+
steps:
96+
- uses: actions/checkout@v3
97+
with:
98+
fetch-depth: 0
99+
- uses: apache/skywalking-eyes@main
100+
101+
# The TruffleHog OSS Github Action can be used to scan a range of commits for leaked credentials. The action will fail if any results are found.
102+
# More see: https://github.com/marketplace/actions/trufflehog-oss
103+
SecretScan:
104+
name: Secret Scan
105+
runs-on: ubuntu-latest
106+
steps:
107+
- name: Checkout
108+
uses: actions/checkout@v3
109+
with:
110+
fetch-depth: 0
111+
- name: TruffleHog OSS
112+
uses: trufflesecurity/trufflehog@main
113+
with:
114+
path: ./
115+
base: ${{ github.event.repository.default_branch }}
116+
head: HEAD
117+
extra_args: --debug --json
118+
119+
# TODO: Uncomment when the repository is publicly.
120+
# DependencyReview:
121+
# permissions:
122+
# actions: read
123+
# contents: read
124+
# security-events: write
125+
# name: Dependency Review
126+
# runs-on: ubuntu-latest
127+
# steps:
128+
# - uses: actions/checkout@v3
129+
# with:
130+
# fetch-depth: 0
131+
# - uses: actions/dependency-review-action@v3
132+
# with:
133+
# fail-on-severity: critical

Diff for: .github/workflows/ci.yaml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release-*
8+
pull_request: {}
9+
workflow_dispatch: {}
10+
11+
env:
12+
# Common versions
13+
GO_VERSION: '1.18'
14+
GOLANGCI_VERSION: 'v1.42'
15+
16+
jobs:
17+
18+
ci-build-test:
19+
name: ci-build
20+
runs-on: ubuntu-18.04
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
with:
25+
submodules: true
26+
- name: Setup Go
27+
uses: actions/setup-go@v2
28+
with:
29+
go-version: ${{ env.GO_VERSION }}
30+
- name: Install Protoc
31+
uses: arduino/setup-protoc@v1
32+
with:
33+
version: '3.15.x'
34+
- name: Build and Test
35+
run: |
36+
make build test
37+
- name: Check diff
38+
run: |
39+
git status
40+
[[ -z $(git status -s) ]] || (git status; printf "Existing modified/untracked files.\nPlease run \"make generate manifests\" and push again.\n"; exit 1)

Diff for: .gitignore

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
/bin/
8+
/testbin/
9+
bin/
10+
# Test binary, built with `go test -c`
11+
*.test
12+
13+
# Output of the go coverage tool, specifically when used with LiteIDE
14+
*.out
15+
16+
# Dependency directories (remove the comment below to include it)
17+
# vendor/
18+
19+
.idea/

Diff for: .licenserc.yaml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
header:
2+
license:
3+
spdx-id: Apache-2.0
4+
copyright-owner: The KusionStack Authors
5+
content: |
6+
Licensed under the Apache License, Version 2.0 (the "License");
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
paths:
18+
- '**'
19+
paths-ignore:
20+
- '**/*.conf'
21+
- '**/*.DS_Store'
22+
- '**/*.json'
23+
- '**/*.lock'
24+
- '**/*.Dockerfile'
25+
- '**/*.sh'
26+
- '**/*.yaml'
27+
- '**/*.md'
28+
- '**/*.mk'
29+
- '**/*.svg'
30+
- '**/*.txt'
31+
- '**/*.xlf'
32+
- '**/.husky/**'
33+
- '**/node_modules/**'
34+
- '**/.babelrc'
35+
- '**/.browserslistrc'
36+
- '**/.editorconfig'
37+
- '**/.jsbeautifyrc'
38+
- '**/.yarnrc.yml'
39+
- '**/config_repos'
40+
- '**/go.mod'
41+
- '**/go.sum'
42+
- '**/go.work'
43+
- '**/go.work.sum'
44+
- '**/lcov.info'
45+
- '**/Makefile'
46+
- '**/OWNERS'
47+
- '.github/**'
48+
- '.idea/**'
49+
- '.vscode/**'
50+
- '.dist/**'
51+
- '.husky/**'
52+
- 'hack/**'
53+
- 'LICENSE'
54+
- 'OWNERS_ALIASES'
55+
- 'SECURITY_CONTACTS'
56+
- 'vendor/**'
57+
- '.gitignore'
58+
- '.licenserc'
59+
comment: never
60+
license-location-threshold: 80

0 commit comments

Comments
 (0)