Skip to content

Commit 4074907

Browse files
committed
chore: add GitHub configuration files
- Add CODEOWNERS file to define default code reviewers - Introduce issue templates for bug reports, enhancements, and failing tests - Add pull request template to standardize PR descriptions - Implement GitHub workflows for CLA enforcement and PR title linting These changes aim to streamline the contribution process, ensure consistent issue and PR descriptions, and automate certain checks to maintain project quality.
1 parent 4897e9e commit 4074907

File tree

8 files changed

+318
-0
lines changed

8 files changed

+318
-0
lines changed

.github/CODEOWNERS

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# This is a comment.
2+
# Each line is a file pattern followed by one or more owners.
3+
4+
# These owners will be the default owners for everything in
5+
# the repo. Unless a later match takes precedence,
6+
# @global-owner1 and @global-owner2 will be requested for
7+
# review when someone opens a pull request.
8+
# * @global-owner1 @global-owner2
9+
* @elliotxx @adohe @ffforest @ruquanzhao @fanfan-yu
10+
# Order is important; the last matching pattern takes the most
11+
# precedence. When someone opens a pull request that only
12+
# modifies JS files, only @js-owner and not the global
13+
# owner(s) will be requested for a review.
14+
# *.js @js-owner
15+
16+
# You can also use email addresses if you prefer. They'll be
17+
# used to look up users just like we do for commit author
18+
# emails.
19+
20+
21+
# Teams can be specified as code owners as well. Teams should
22+
# be identified in the format @org/team-name. Teams must have
23+
# explicit write access to the repository. In this example,
24+
# the octocats team in the octo-org organization owns all .txt files.
25+
# *.txt @octo-org/octocats
26+
*.go @elliotxx @adohe @ffforest @ruquanzhao @fanfan-yu
27+
28+
# In this example, @doctocat owns any files in the build/logs
29+
# directory at the root of the repository and any of its
30+
# subdirectories.
31+
# /build/logs/ @doctocat
32+
/.github/ @elliotxx @adohe @ffforest @ruquanzhao @fanfan-yu
33+
34+
# The `docs/*` pattern will match files like
35+
# `docs/getting-started.md` but not further nested files like
36+
# `docs/build-app/troubleshooting.md`.
37+
38+
39+
# In this example, @octocat owns any file in an apps directory
40+
# anywhere in your repository.
41+
# apps/ @octocat
42+
43+
# In this example, @doctocat owns any file in the `/docs`
44+
# directory in the root of your repository and any of its
45+
# subdirectories.
46+
# /docs/ @doctocat
47+
48+
# In this example, @octocat owns any file in the `/apps`
49+
# directory in the root of your repository except for the `/apps/github`
50+
# subdirectory, as its owners are left empty.
51+
# /apps/ @octocat
52+
# /apps/github
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Bug Report
2+
description: Report a bug encountered while operating terraform-provider-karpor
3+
labels: kind/bug
4+
body:
5+
- type: textarea
6+
id: problem
7+
attributes:
8+
label: What happened?
9+
description: |
10+
Please provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner.
11+
validations:
12+
required: true
13+
14+
- type: textarea
15+
id: expected
16+
attributes:
17+
label: What did you expect to happen?
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: repro
23+
attributes:
24+
label: How can we reproduce it (as minimally and precisely as possible)?
25+
validations:
26+
required: true
27+
28+
- type: textarea
29+
id: additional
30+
attributes:
31+
label: Anything else we need to know?
32+
33+
- type: textarea
34+
id: KarporVersion
35+
attributes:
36+
label: Karpor version
37+
value: |
38+
<details>
39+
40+
```console
41+
$ karpor -V
42+
# paste output here
43+
```
44+
45+
</details>
46+
validations:
47+
required: true
48+
49+
- type: textarea
50+
id: osVersion
51+
attributes:
52+
label: OS version
53+
value: |
54+
<details>
55+
56+
```console
57+
# On Linux:
58+
$ cat /etc/os-release
59+
# paste output here
60+
$ uname -a
61+
# paste output here
62+
63+
# On Windows:
64+
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
65+
# paste output here
66+
```
67+
68+
</details>
69+
70+
- type: textarea
71+
id: installer
72+
attributes:
73+
label: Install tools
74+
value: |
75+
<details>
76+
77+
</details>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Enhancement Tracking Issue
2+
description: Provide supporting details for a feature in development
3+
labels: kind/feature
4+
body:
5+
- type: textarea
6+
id: feature
7+
attributes:
8+
label: What would you like to be added?
9+
validations:
10+
required: true
11+
12+
- type: textarea
13+
id: rationale
14+
attributes:
15+
label: Why is this needed?
16+
validations:
17+
required: true
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Failing Test
2+
description: Report continuously failing tests or jobs in terraform-provider-karpor
3+
labels: kind/failing-test
4+
body:
5+
- type: textarea
6+
id: jobs
7+
attributes:
8+
label: Which jobs are failing?
9+
placeholder: |
10+
Please only use this template for submitting reports about continuously failing tests or jobs in terraform-provider-karpor.
11+
validations:
12+
required: true
13+
14+
- type: textarea
15+
id: tests
16+
attributes:
17+
label: Which tests are failing?
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: since
23+
attributes:
24+
label: Since when has it been failing?
25+
validations:
26+
required: true
27+
28+
- type: input
29+
id: testgrid
30+
attributes:
31+
label: Testgrid link
32+
33+
- type: textarea
34+
id: reason
35+
attributes:
36+
label: Reason for failure (if possible)
37+
38+
- type: textarea
39+
id: additional
40+
attributes:
41+
label: Anything else we need to know?

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## What type of PR is this?
2+
3+
<!--
4+
Add one of the following kinds:
5+
/kind bug
6+
/kind cleanup
7+
/kind refactor
8+
/kind documentation
9+
/kind feature
10+
/kind chore
11+
/kind perf
12+
/kind style
13+
/kind test
14+
-->
15+
16+
## What this PR does / why we need it:
17+
18+
TODO
19+
20+
## Which issue(s) this PR fixes:
21+
22+
<!--
23+
*Automatically closes linked issue when PR is merged.
24+
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
25+
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
26+
-->
27+
28+
Fixes #

.github/workflows/cla.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "CLA Assistant"
2+
on:
3+
issue_comment:
4+
types: [created]
5+
pull_request_target:
6+
types: [opened,closed,synchronize]
7+
8+
jobs:
9+
CLAssistant:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: "CLA Assistant"
13+
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
14+
# Beta Release
15+
uses: cla-assistant/[email protected]
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
# the below token should have repo scope and must be manually added by you in the repository's secret
19+
PERSONAL_ACCESS_TOKEN : ${{ secrets.KUSIONSTACK_BOT_TOKEN }}
20+
with:
21+
path-to-document: 'https://github.com/KusionStack/.github/blob/main/CLA.md' # e.g. a CLA or a DCO document
22+
23+
# branch should not be protected
24+
lock-pullrequest-aftermerge: True
25+
path-to-signatures: 'signatures/version1/cla.json'
26+
remote-organization-name: KusionStack
27+
remote-repository-name: cla.db
28+
branch: 'main'
29+
allowlist: bot*
30+
31+
#below are the optional inputs - If the optional inputs are not given, then default values will be taken
32+
#remote-organization-name: enter the remote organization name where the signatures should be stored (Default is storing the signatures in the same repository)
33+
#remote-repository-name: enter the remote repository name where the signatures should be stored (Default is storing the signatures in the same repository)
34+
#create-file-commit-message: 'For example: Creating file for storing CLA Signatures'
35+
#signed-commit-message: 'For example: $contributorName has signed the CLA in #$pullRequestNo'
36+
#custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign'
37+
#custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA'
38+
#custom-allsigned-prcomment: 'pull request comment when all contributors has signed, defaults to **CLA Assistant Lite bot** All Contributors have signed the CLA.'
39+
#lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
40+
#use-dco-flag: true - If you are using DCO instead of CLA

.github/workflows/constraint.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Reference from:
2+
# https://github.com/c-bata/go-prompt/blob/master/.github/workflows/test.yml
3+
name: Constraints
4+
on:
5+
pull_request:
6+
types: [opened, edited, synchronize, reopened]
7+
jobs:
8+
# Lints Pull Request title, because the title will be used as the
9+
# commit message in branch main.
10+
#
11+
# Configuration detail can be referenced:
12+
# https://github.com/marketplace/actions/pull-request-title-rules
13+
PullRequestTitleLint:
14+
name: Pull Request Title Lint
15+
runs-on: ubuntu-latest
16+
if: contains(fromJSON('["pull_request"]'), github.event_name)
17+
steps:
18+
- uses: deepakputhraya/action-pr-title@master
19+
with:
20+
allowed_prefixes: 'build,chore,ci,docs,feat,fix,perf,refactor,revert,style,test' # title should start with the given prefix
21+
disallowed_prefixes: 'WIP,[WIP]' # title should not start with the given prefix
22+
prefix_case_sensitive: false # title prefix are case insensitive
23+
min_length: 5 # Min length of the title
24+
max_length: 80 # Max length of the title
25+
github_token: ${{ github.token }} # Default: ${{ github.token }}
26+
# Checks all Markdown files in repository for broken links.
27+
# https://github.com/gaurav-nelson/github-action-markdown-link-check
28+
MarkdownLinkCheck:
29+
name: Markdown Link Check
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: gaurav-nelson/github-action-markdown-link-check@v1
34+
with:
35+
config-file: '.github/workflows/mlc_config.json'

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Binaries
2+
*.exe
3+
*.dll
4+
*.so
5+
*.dylib
6+
7+
# Test binary
8+
*.test
9+
10+
# Output
11+
terraform-provider-karpor
12+
13+
# IDE
14+
.vscode/
15+
.idea/
16+
17+
# Dependency directories
18+
vendor/
19+
20+
# Terraform
21+
.terraform.lock.hcl
22+
.terraform/
23+
24+
# Logs
25+
*.log
26+
27+
# System
28+
.DS_Store

0 commit comments

Comments
 (0)