Skip to content

test: 测试 OpenCode GitHub Action#37

Merged
foxzool merged 12 commits intomainfrom
ci
Jan 24, 2026
Merged

test: 测试 OpenCode GitHub Action#37
foxzool merged 12 commits intomainfrom
ci

Conversation

@foxzool
Copy link
Owner

@foxzool foxzool commented Jan 23, 2026

测试目标

测试 opencode GitHub Action 的触发和执行。

测试步骤

  1. ✅ 创建 ci 分支
  2. ✅ 添加测试文件
  3. ✅ 推送到远程仓库
  4. 🔄 创建 Pull Request
  5. ⏳ 在 PR 中评论 /opencode 触发 action

预期结果

opencode action 应该:

  • 检测到 /opencode/oc 评论命令
  • 使用配置的 ZHIPU_API_KEY 调用 OpenCode 服务
  • 在 PR 中返回 AI 代码分析结果

相关配置

  • Workflow: .github/workflows/opencode.yml
  • 触发条件: PR 评论中包含 /opencode/oc

@foxzool
Copy link
Owner Author

foxzool commented Jan 23, 2026

/opencode

1 similar comment
@foxzool
Copy link
Owner Author

foxzool commented Jan 23, 2026

/opencode

@foxzool
Copy link
Owner Author

foxzool commented Jan 23, 2026

/opencode

@foxzool
Copy link
Owner Author

foxzool commented Jan 23, 2026

/opencode

@foxzool
Copy link
Owner Author

foxzool commented Jan 23, 2026

/opencode

2 similar comments
@foxzool
Copy link
Owner Author

foxzool commented Jan 23, 2026

/opencode

@foxzool
Copy link
Owner Author

foxzool commented Jan 23, 2026

/opencode

@foxzool
Copy link
Owner Author

foxzool commented Jan 23, 2026

/opencode 测试修复

@foxzool
Copy link
Owner Author

foxzool commented Jan 23, 2026

/opencode 使用 use_github_token 参数

@foxzool
Copy link
Owner Author

foxzool commented Jan 23, 2026

/opencode 测试 v1.1.34

@foxzool
Copy link
Owner Author

foxzool commented Jan 23, 2026

/opencode 最终测试 - 同时设置 GITHUB_TOKEN env 和 use_github_token param

@foxzool
Copy link
Owner Author

foxzool commented Jan 23, 2026

/opencode 测试官方推荐配置

@foxzool
Copy link
Owner Author

foxzool commented Jan 23, 2026

/opencode 测试添加 actions: read 权限

@foxzool
Copy link
Owner Author

foxzool commented Jan 23, 2026

/oc summary

@foxzool foxzool merged commit ad6bc84 into main Jan 24, 2026
35 checks passed
@foxzool foxzool deleted the ci branch January 24, 2026 16:54
foxzool added a commit that referenced this pull request Jan 29, 2026
* test: 添加 OpenCode action 测试文件

* fix: 添加 opencode action 所需的权限

* fix: 移除 persist-credentials 并显式传递 GITHUB_TOKEN

* fix: 根据 OpenCode 官方文档更新 workflow 配置

* fix: 添加 USE_GITHUB_TOKEN 环境变量绕过 OIDC 限制

* fix: 修正 USE_GITHUB_TOKEN 为输入参数

* fix: 使用具体版本 v1.1.34 替代 @latest

* fix: 同时设置 GITHUB_TOKEN 环境变量和 use_github_token 参数

* fix: 使用 fetch-depth: 1 和 persist-credentials: false

* fix: 添加 actions: read 权限

* fix: 简化 opencode workflow 配置(降级权限为只读并移除不必要参数)

* fix: 恢复 opencode workflow 所需的写权限和配置参数
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant