diff --git a/.github/scripts/branch-diff.sh b/.github/scripts/branch-diff.sh deleted file mode 100644 index cfaa7c53b..000000000 --- a/.github/scripts/branch-diff.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -# 如果未提供目标分支,使用 main 分支 -if [ -z "$1" ]; then - target_branch="origin/main" -else - target_branch=$1 -fi - -diff_list=$(git diff --name-only "$target_branch" -- 'common/*' 'frontend/*') -convert_to_json_array() { - local input_string="$1" - local output_array="[" - - # 使用 IFS 变量临时更改字段分隔符为换行符 - old_ifs=$IFS - IFS=$'\n' - - # 将字符串分割为单词并添加到数组中 - for word in $input_string; do - output_array+="\"$word\"," - done - - # 移除最后一个逗号并关闭数组 - output_array=${output_array%,}"]" - - # 恢复原始 IFS 值 - IFS=$old_ifs - - echo "$output_array" -} - -echo "$(convert_to_json_array "$diff_list")" \ No newline at end of file diff --git a/.github/workflows/frontend-ci.yaml b/.github/workflows/frontend-ci.yaml index 13a3e8fe1..7669f422d 100644 --- a/.github/workflows/frontend-ci.yaml +++ b/.github/workflows/frontend-ci.yaml @@ -51,13 +51,13 @@ jobs: ${{ runner.os }}-rush-store-main ${{ runner.os }}-rush-store - - name: Branch Diff - id: branch-diff - run: | - TARGET_BRANCH="${GITHUB_BASE_REF:-main}" - git fetch origin $TARGET_BRANCH - sh .github/scripts/branch-diff.sh origin/$TARGET_BRANCH > changed.json - echo "file=changed.json" >> "$GITHUB_OUTPUT" + - name: Changed Files + uses: tj-actions/changed-files@v46.0.5 + with: + files: | + frontend/** + json: true + write_output_files: true - name: Install Dependencies run: | @@ -69,5 +69,5 @@ jobs: - name: Lint & Style run: | - node common/scripts/install-run-rush.js increment --action lint -p ${{ steps.branch-diff.outputs.file }} - node common/scripts/install-run-rush.js increment --action style -p ${{ steps.branch-diff.outputs.file }} + node common/scripts/install-run-rush.js increment --action lint -p .github/outputs/all_changed_files.json + node common/scripts/install-run-rush.js increment --action style -p .github/outputs/all_changed_files.json diff --git a/.github/workflows/frontend-tsc-ci.yaml b/.github/workflows/frontend-tsc-ci.yaml index 47c989287..c12d962e2 100644 --- a/.github/workflows/frontend-tsc-ci.yaml +++ b/.github/workflows/frontend-tsc-ci.yaml @@ -50,17 +50,17 @@ jobs: ${{ runner.os }}-rush-store-main ${{ runner.os }}-rush-store - - name: Branch Diff - id: branch-diff - run: | - TARGET_BRANCH="${GITHUB_BASE_REF:-main}" - git fetch origin $TARGET_BRANCH - sh .github/scripts/branch-diff.sh origin/$TARGET_BRANCH > changed.json - echo "file=changed.json" >> "$GITHUB_OUTPUT" + - name: Changed Files + uses: tj-actions/changed-files@v46.0.5 + with: + files: | + frontend/** + json: true + write_output_files: true - name: Install Dependencies run: | - node common/scripts/install-run-rush.js increment --action install -p ${{ steps.branch-diff.outputs.file }} + node common/scripts/install-run-rush.js increment --action install -p .github/outputs/all_changed_files.json - name: Prepare Basic Packages run: | @@ -68,4 +68,4 @@ jobs: - name: TS Check run: | - node common/scripts/install-run-rush.js increment --action ts-check -p ${{ steps.branch-diff.outputs.file }} + node common/scripts/install-run-rush.js increment --action ts-check -p .github/outputs/all_changed_files.json diff --git a/.github/workflows/issue-sync.yaml b/.github/workflows/issue-sync.yaml index cddde1f32..1519ed551 100644 --- a/.github/workflows/issue-sync.yaml +++ b/.github/workflows/issue-sync.yaml @@ -27,7 +27,7 @@ jobs: - name: Install ci-tools run: | - npm install -g @cozeloop/ci-tools@0.0.1 + npm install -g @cozeloop/ci-tools@0.0.4 - name: Notify via lark run: | diff --git a/.github/workflows/pr-sync.yaml b/.github/workflows/pr-sync.yaml new file mode 100644 index 000000000..81dca1ebf --- /dev/null +++ b/.github/workflows/pr-sync.yaml @@ -0,0 +1,40 @@ +name: PR Notification + +on: + pull_request: + types: ['opened', 'reopened', 'closed'] + +jobs: + sync: + name: Send Lark Message + runs-on: ubuntu-latest + env: + NODE_VERSION: '18' + LARK_APP_ID: ${{ secrets.COZELOOP_LARK_APP_ID }} + LARK_APP_SECRET: ${{ secrets.COZELOOP_LARK_APP_SECRET }} + REPO_NAME: ${{ github.repository }} + PR_ACTION: ${{ github.event.action }} + PR_URL: ${{ github.event.pull_request.html_url }} + PR_NUMBER: ${{ github.event.pull_request.number }} + PR_TITLE: ${{ github.event.pull_request.title }} + PR_SENDER: ${{ github.event.sender.login }} + PR_SOURCE_OWNER: ${{ github.event.pull_request.head.repo.owner.login }} + PR_SOURCE_REF: ${{ github.event.pull_request.head.ref }} + PR_TARGET_OWNER: ${{ github.event.pull_request.base.repo.owner.login }} + PR_TARGET_REF: ${{ github.event.pull_request.base.ref }} + PR_MERGED: ${{ github.event.pull_request.merged }} + + steps: + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VERSION }} + + - name: Install ci-tools + run: | + npm install -g @cozeloop/ci-tools@0.0.4 + + - name: Notify via lark + run: | + cozeloop-ci lark sync-pr \ + --chat-id oc_d02b85f9799a0c35cf164d3a939ef30e diff --git a/README.cn.md b/README.cn.md index b5afec080..9c3e0a5b5 100644 --- a/README.cn.md +++ b/README.cn.md @@ -1,4 +1,4 @@ - +
@@ -33,7 +33,7 @@ Coze Loop 通过提供全生命周期的管理能力,帮助开发者更高效
| **功能** | **功能点** |
| --- | --- |
-| Prompt 调试 | * Playground 调试、对比、
* Prompt 版本管理 |
+| Prompt 调试 | * Playground 调试、对比
* Prompt 版本管理 |
| 评测 | * 管理评测集
* 管理评估器
* 管理实验 |
| 观测 | * SDK 上报 Trace
* Trace 数据观测 |
| 模型 | 支持接入 OpenAI、火山方舟等模型 |
@@ -99,16 +99,13 @@ Coze Loop 通过提供全生命周期的管理能力,帮助开发者更高效
### 技术交流与讨论
加入我们的技术交流群,与其他开发者分享经验、获取项目最新动态:
-**飞书群聊**
-飞书移动端扫描以下二维码,加入Coze Loop 技术交流群。
+* 飞书群聊:飞书移动端扫描以下二维码,加入Coze Loop 技术交流群。

-**Discord 服务器**
-点击加入:[Coze Community](https://discord.gg/a6YtkysB)
+* Discord 服务器:[Coze Community](https://discord.gg/a6YtkysB)
-**Telegram 群组**
-点击加入:Telegram Group [Coze](https://t.me/+pP9CkPnomDA0Mjgx)
+* Telegram 群组:[Coze](https://t.me/+pP9CkPnomDA0Mjgx)
## 致谢
感谢所有为 Coze Loop 项目做出贡献的开发者和社区成员。特别感谢:
diff --git a/README.md b/README.md
index 898cbc5de..8f059bf95 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-
+