-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
446f48a
commit 3a52a69
Showing
18 changed files
with
5,664 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
indent_size = 2 | ||
indent_style = space | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# These owners will be the default owners for everything in | ||
# the repo. They will be requested for review whenever someone | ||
# opens a PR, unless a later match takes precedence. | ||
* @adamdehaven @jillztom @Kong/team-core-ui | ||
|
||
# Workflows & CI | ||
/.github/ @adamdehaven @jillztom @ValeryG | ||
/lefthook.yaml @adamdehaven @jillztom | ||
|
||
# ================================================ | ||
# Renovate Bot approvals | ||
# Allow Kongponents BOT to approve dependency updates | ||
# These rules MUST remain at the bottom as the last entry | ||
package.json @kongponents-bot @Kong/team-core-ui @adamdehaven @jillztom @ValeryG | ||
yarn.lock @kongponents-bot @Kong/team-core-ui @adamdehaven @jillztom @ValeryG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Setup PNPM with Dependencies | ||
description: Reusable composition of setup-node, cache, and pnpm install actions | ||
inputs: | ||
nodejs-version: | ||
description: 'Version of NodeJS to use (ex: 20.13.1)' | ||
default: '20.13.1' | ||
force-install: | ||
description: When 'true', pnpm install will be executed regardless of a cache hit | ||
required: false | ||
default: 'false' | ||
frozen-lockfile: | ||
description: When false, pnpm install will use the --no-frozen-lockfile flag | ||
required: false | ||
default: 'true' | ||
outputs: | ||
cache-hit: | ||
description: Whether or not there was a cache hit | ||
value: ${{ steps.dependency-cache.outputs.cache-hit }} | ||
runs: | ||
using: composite | ||
steps: | ||
|
||
- name: get Node version | ||
id: node-version | ||
shell: bash | ||
run: | | ||
voltaNodeVersion=$(cat package.json|jq -r ".volta.node") | ||
if [[ $voltaNodeVersion == null ]]; then | ||
voltaNodeVersion="${{ inputs.nodejs-version }}" | ||
fi | ||
voltaPnpmVersion=$(cat package.json|jq -r ".volta.pnpm") | ||
if [[ $voltaPnpmVersion == null ]]; then | ||
voltaPnpmVersion="9.1.4" | ||
fi | ||
echo "node-version=${voltaNodeVersion}">> $GITHUB_OUTPUT | ||
echo "pnpm-version=${voltaPnpmVersion}">> $GITHUB_OUTPUT | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ steps.node-version.outputs.node-version }} | ||
|
||
- name: Install PNPM | ||
shell: bash | ||
run: | | ||
npm i -g pnpm@${{ steps.node-version.outputs.pnpm-version }} | ||
pnpm --version | ||
- name: Dependency Cache | ||
id: dependency-cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: '**/node_modules' | ||
key: pnpm-${{ steps.node-version.outputs.pnpm-version }}-${{ steps.node-version.outputs.node-version }}-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
|
||
- name: Install Dependencies | ||
if: ${{ inputs.force-install == 'true' || steps.dependency-cache.outputs.cache-hit != 'true' }} | ||
shell: bash | ||
run: pnpm i${{ inputs.frozen-lockfile == 'false' && ' --no-frozen-lockfile' || '' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
name: Renovate Bot dependency updates auto-merge | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
on: pull_request_target | ||
|
||
jobs: | ||
renovate-autoapprove: | ||
if: ${{ github.actor == 'renovate[bot]' }} | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Approve a PR | ||
run: gh pr review --approve "$PR_URL" | ||
env: | ||
PR_URL: ${{ github.event.pull_request.html_url }} | ||
# Use the bot account PAT to allow auto-approve and merge the PRs | ||
GITHUB_TOKEN: ${{ secrets.KONGPONENTS_BOT_PAT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Lint Commit Messages | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
commitlint: | ||
if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]' }} | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: wagoid/commitlint-github-action@v6 | ||
with: | ||
configFile: commitlint.config.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
# Allow calling manually from GitHub | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run-tests: | ||
name: Tests | ||
uses: ./.github/workflows/test.yaml | ||
|
||
publish: | ||
name: Publish | ||
needs: | ||
- run-tests | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.KONGPONENTS_BOT_PAT }} | ||
|
||
- name: Setup git | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "Kong UI Bot" | ||
- name: Create .npmrc | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN_PUBLIC_PUBLISH }} | ||
# Reference the env variable NPM_TOKEN here, not the secret | ||
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc | ||
|
||
|
||
- name: Setup PNPM with Dependencies | ||
uses: ./.github/actions/setup-pnpm-with-dependencies/ | ||
|
||
- name: Semantic Release | ||
uses: cycjimmy/semantic-release-action@v3 | ||
env: | ||
# Since branch protections are on (pushing commits) you need to use a bot PAT | ||
GITHUB_TOKEN: ${{ secrets.KONGPONENTS_BOT_PAT }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN_PUBLIC_PUBLISH }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Tests | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- labeled | ||
branches: | ||
- main | ||
|
||
# Allow calling manually from GitHub | ||
workflow_dispatch: | ||
|
||
# Allow workflow to be called by another workflow | ||
workflow_call: | ||
|
||
jobs: | ||
test: | ||
name: Run Tests | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup PNPM with Dependencies | ||
uses: ./.github/actions/setup-pnpm-with-dependencies/ | ||
with: | ||
force-install: true | ||
|
||
- name: Lint | ||
run: pnpm lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
node_modules | ||
*.log | ||
.output | ||
.data | ||
# Env variables | ||
.env | ||
.env.local | ||
|
||
package-lock.json | ||
framework | ||
dist | ||
.DS_Store | ||
|
||
# Local History | ||
.history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
shamefully-hoist=true | ||
strict-peer-dependencies=false | ||
auto-install-peers=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
20.13.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# eslint-config-kong-ui |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export default { | ||
extends: ['@commitlint/config-conventional'], | ||
rules: { | ||
'header-max-length': [2, 'always', 100], | ||
'body-max-line-length': [1, 'always', 150], | ||
'type-case': [2, 'always', 'lower-case'], | ||
'scope-case': [2, 'always', 'lower-case'], | ||
}, | ||
ignores: [(message) => /^chore\(release\): .+$/m.test(message)], | ||
} |
Oops, something went wrong.