Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/.licenserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
header:
license:
spdx-id: MIT
pattern: |
Copyright (c) \d{4} Bytedance Ltd. and/or its affiliates
SPDX-License-Identifier: MIT

paths:
- packages/*/{src,__tests__}/**/*.{ts,tsx,less,css}

paths-ignore:
- 'node_modules'
- 'dist'
- 'coverage'
- 'licenses'
- '**/*.md'
- '**/__mock__/**'

comment: on-failure
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml → .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: CI

on:
push:
branches: ['ci/**']
branches: ['ci/**', 'main']
pull_request:
branches: ['main']
workflow_dispatch:

jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
env:
NODE_VERSION: '18'
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/issue-sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Issue Notification

on:
issues:
types: ['opened', 'reopened', 'closed']

jobs:
sync:
name: Sync Issues
runs-on: ubuntu-latest
env:
NODE_VERSION: '18'
LARK_APP_ID: ${{ secrets.COZELOOP_LARK_APP_ID }}
LARK_APP_SECRET: ${{ secrets.COZELOOP_LARK_APP_SECRET }}
ISSUE_ACTION: ${{ github.event.action }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_URL: ${{ github.event.issue.html_url }}
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_BODY: ${{ github.event.issue.body }}
REPO_NAME: ${{ github.repository }}

steps:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install ci-tools
run: |
npm install -g @cozeloop/[email protected]

- name: Notify via lark
run: |
cozeloop-ci lark sync-issue \
--email [email protected]
24 changes: 24 additions & 0 deletions .github/workflows/license-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: License Check

on:
push:
branches: ['ci/**', 'main']
pull_request:
branches: ['main']
workflow_dispatch:

jobs:
license-check:
name: License Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Check License Header
uses: apache/skywalking-eyes/[email protected]
with:
config: .github/.licenserc.yaml
token: ${{ secrets.GITHUB_TOKEN }}
52 changes: 52 additions & 0 deletions .github/workflows/semantic-pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Semantic Pull Request

on:
pull_request:
types:
- opened
- reopened
- edited

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}
cancel-in-progress: true

jobs:
main:
name: Check Pull Request Title
runs-on: ubuntu-latest
steps:
- uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# see https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#type
types: |
build
ci
docs
feat
fix
perf
refactor
style
test
chore
# sdk: cozeloop-ai, cozeloop-langchain, etc
# infra: rush update, {eslint,ts,vitest}-config, prettier etc
# tools: ci-tools, etc
# workflow: gh workflow
scopes: |
sdk
infra
tools
workflow
# The pull request's title should be fulfilled the following pattern:
#
# [<type>][<optional scope>] <description>
#
# ... where valid types and scopes can be found above; for example:
#
# [fix][test] flaky test V1_ProxyAuthenticationTest.anonymousSocketTest
headerPattern: '^\[(\w*?)\](?:\[(.*?)\])?(?:\s*)(.*)$'
headerPatternCorrespondence: type, scope, subject
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ This monorepo contains the following packages:
| Package | Description | Version |
|---------|------------|---------|
| [@cozeloop/ai](./packages/cozeloop-ai) | CozeLoop API SDK | [![npm](https://img.shields.io/npm/v/@cozeloop/ai.svg)](https://www.npmjs.com/package/@cozeloop/ai) |
| [@cozeloop/langchain](./packages/cozeloop-langchain) | CozeLoop LangChain Integration | [![npm](https://img.shields.io/npm/v/@cozeloop/langchain.svg)](https://www.npmjs.com/package/@cozeloop/langchain) |


## 🎮 Examples
Expand Down
1 change: 1 addition & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
| 包名 | 描述 | 版本 |
|---------|------------|---------|
| [@cozeloop/ai](./packages/cozeloop-ai) | CozeLoop API SDK | [![npm](https://img.shields.io/npm/v/@cozeloop/ai.svg)](https://www.npmjs.com/package/@cozeloop/ai) |
| [@cozeloop/langchain](./packages/cozeloop-langchain) | CozeLoop LangChain Integration | [![npm](https://img.shields.io/npm/v/@cozeloop/langchain.svg)](https://www.npmjs.com/package/@cozeloop/langchain) |


## 🎮 示例
Expand Down
3 changes: 3 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ coverage:
target: 80%
threshold: 5%

github_checks:
annotations: false

comment:
layout: 'header, diff, components, files' # show component info in the PR comment
require_changes: false # if true: only post the comment if coverage changes
Expand Down
29 changes: 8 additions & 21 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions config/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@
"eslint-plugin-prettier": "~5.2.1",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-react": "~7.37.1",
"eslint-plugin-react-hooks": "5.1.0-beta-26f2496093-20240514",
"eslint-plugin-redux-saga": "^1.1.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-risxss": "~2.1.0",
"eslint-plugin-security": "3.0.1",
"eslint-plugin-unicorn": "48.0.1",
Expand Down
2 changes: 2 additions & 0 deletions packages/cozeloop-ai/__tests__/tracer/propagation.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
// SPDX-License-Identifier: MIT
/* eslint-disable security/detect-object-injection -- skip */
import {
cozeLoopGetter,
Expand Down
2 changes: 2 additions & 0 deletions packages/cozeloop-ai/__tests__/tracer/tags.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
// SPDX-License-Identifier: MIT
import { type ReadableSpan } from '@opentelemetry/sdk-trace-base';
import { SpanStatusCode, type Span } from '@opentelemetry/api';

Expand Down
Loading