Skip to content

Commit

Permalink
chore: setup github config, such as codeowners, pr template, issue te…
Browse files Browse the repository at this point in the history
…mplate, ci etc (#2)

#### 1. Does this PR affect any open issues?(Y/N) and add issue
references (e.g. "fix #123", "re #123".):

- [x] N
- [ ] Y 

#### 2. What is the scope of this PR (e.g. component or file name):
Setup github config, such as codeowners, pr template, issue template, ci
etc

#### 3. Provide a description of the PR(e.g. more details, effects,
motivations or doc link):

<!-- You can choose a brief description here -->
- [ ] Affects user behaviors
- [ ] Contains syntax changes
- [ ] Contains variable changes
- [ ] Contains experimental features
- [ ] Performance regression: Consumes more CPU
- [ ] Performance regression: Consumes more Memory
- [x] Other

<!-- You can add more details here.
    e.g. 
    Call method "XXXX" to ..... in order to ....,
    More details: https://XXXX.com/doc......
-->

#### 4. Are there any breaking changes?(Y/N) and describe the breaking
changes(e.g. more details, motivations or doc link):

- [x] N
- [ ] Y 

#### 5. Are there test cases for these changes?(Y/N) select and add more
details, references or doc links:

- [ ] Unit test
- [ ] Integration test
- [ ] Benchmark (add benchmark stats below)
- [ ] Manual test (add detailed scripts or steps below)
- [x] Other
  • Loading branch information
elliotxx authored Aug 3, 2023
1 parent 7e13366 commit efe1e4a
Show file tree
Hide file tree
Showing 5 changed files with 226 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# This is a comment.
# Each line is a file pattern followed by one or more owners.

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
# * @global-owner1 @global-owner2
* @elliotxx @adohe

# Order is important; the last matching pattern takes the most
# precedence. When someone opens a pull request that only
# modifies JS files, only @js-owner and not the global
# owner(s) will be requested for a review.
# *.js @js-owner

# You can also use email addresses if you prefer. They'll be
# used to look up users just like we do for commit author
# emails.
# *.go [email protected]

# Teams can be specified as code owners as well. Teams should
# be identified in the format @org/team-name. Teams must have
# explicit write access to the repository. In this example,
# the octocats team in the octo-org organization owns all .txt files.
# *.txt @octo-org/octocats
*.k @elliotxx @adohe

# In this example, @doctocat owns any files in the build/logs
# directory at the root of the repository and any of its
# subdirectories.
# /build/logs/ @doctocat
/.github/ @elliotxx @adohe

# The `docs/*` pattern will match files like
# `docs/getting-started.md` but not further nested files like
# `docs/build-app/troubleshooting.md`.
# docs/* [email protected]

# In this example, @octocat owns any file in an apps directory
# anywhere in your repository.
# apps/ @octocat

# In this example, @doctocat owns any file in the `/docs`
# directory in the root of your repository and any of its
# subdirectories.
# /docs/ @doctocat
/models/ @elliotxx @adohe

# In this example, @octocat owns any file in the `/apps`
# directory in the root of your repository except for the `/apps/github`
# subdirectory, as its owners are left empty.
# /apps/ @octocat
# /apps/github
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Enhancement Tracking Issue
description: Provide supporting details for a feature in development
labels: kind/feature
body:
- type: textarea
id: feature
attributes:
label: What would you like to be added?
validations:
required: true

- type: textarea
id: rationale
attributes:
label: Why is this needed?
validations:
required: true
68 changes: 68 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<!-- Thank you for contributing to Catalog!
Note:
1. With pull requests:
- Open your pull request against "mainb
- Your pull request should have no more than three commits, if not you should squash them.
- It should pass all tests in the available continuous integration systems such as GitHub Actions.
- You should add/modify tests to cover your proposed code changes.
- If your pull request contains a new feature, please document it on the README.
2. Please create an issue first to describe the problem.
We recommend that link the issue with the PR in the following question.
For more info, check https://kusionstack.io/docs/governance/contribute/
-->

## What type of PR is this?

<!--
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind chore
-->

## What this PR does / why we need it:

## Which issue(s) this PR fixes:

<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
-->

Fixes #

## Special notes for your reviewer:

### Does this PR introduce a user-facing change?

<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
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".
-->

```release-note
```

### Additional documentation e.g., design docs, usage docs, etc.:

<!--
Please use the following format for linking documentation:
- [Design]: <link>
- [Usage]: <link>
- [Other doc]: <link>
-->

```docs
```
46 changes: 46 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Reference from:
# https://github.com/c-bata/go-prompt/blob/master/.github/workflows/test.yml
name: Check
on:
pull_request:
types: [opened, edited, synchronize, reopened]
branches:
- main
push:
branches:
- main
jobs:
# Lints Pull Request commits with commitlint.
#
# Rules can be referenced:
# https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional
CommitLint:
name: Commit Lint
runs-on: ubuntu-latest
if: contains(fromJSON('["pull_request"]'), github.event_name)
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5

# Lints Pull Request title, because the title will be used as the
# commit message in branch main.
#
# Configuration detail can be referenced:
# https://github.com/marketplace/actions/pull-request-title-rules
PullRequestTitleLint:
name: Pull Request Title Lint
runs-on: ubuntu-latest
if: contains(fromJSON('["pull_request"]'), github.event_name)
steps:
- uses: deepakputhraya/action-pr-title@master
with:
allowed_prefixes: 'build,chore,ci,docs,feat,fix,perf,refactor,revert,style,test' # title should start with the given prefix
disallowed_prefixes: 'WIP,[WIP]' # title should not start with the given prefix
prefix_case_sensitive: false # title prefix are case insensitive
min_length: 5 # Min length of the title
max_length: 80 # Max length of the title
github_token: ${{ github.token }} # Default: ${{ github.token }}

41 changes: 41 additions & 0 deletions .github/workflows/cla.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "CLA Assistant"
on:
issue_comment:
types: [created]
pull_request_target:
types: [opened,closed,synchronize]

jobs:
CLAssistant:
runs-on: ubuntu-latest
steps:
- name: "CLA Assistant"
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'
# Beta Release
uses: cla-assistant/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# the below token should have repo scope and must be manually added by you in the repository's secret
PERSONAL_ACCESS_TOKEN : ${{ secrets.KUSIONSTACK_BOT_TOKEN }}
with:
path-to-document: 'https://github.com/KusionStack/.github/blob/main/CLA.md' # e.g. a CLA or a DCO document

# branch should not be protected
lock-pullrequest-aftermerge: True
path-to-signatures: 'signatures/version1/cla.json'
remote-organization-name: KusionStack
remote-repository-name: cla.db
branch: 'main'
allowlist: bot*

#below are the optional inputs - If the optional inputs are not given, then default values will be taken
#remote-organization-name: enter the remote organization name where the signatures should be stored (Default is storing the signatures in the same repository)
#remote-repository-name: enter the remote repository name where the signatures should be stored (Default is storing the signatures in the same repository)
#create-file-commit-message: 'For example: Creating file for storing CLA Signatures'
#signed-commit-message: 'For example: $contributorName has signed the CLA in #$pullRequestNo'
#custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign'
#custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA'
#custom-allsigned-prcomment: 'pull request comment when all contributors has signed, defaults to **CLA Assistant Lite bot** All Contributors have signed the CLA.'
#lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
#use-dco-flag: true - If you are using DCO instead of CLA

0 comments on commit efe1e4a

Please sign in to comment.