症状:
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate
原因:
- Python 3.14.0b1 来自 ServBay (
/Applications/ServBay/script/alias/python3) - ServBay 的 Python 使用独立的 OpenSSL,证书路径配置不正确
- Python 无法找到系统的 CA 证书
修复方案:
在 create_issue.py 和 update_issue.py 中添加 SSL 上下文修复:
import ssl
import certifi
ssl._create_default_https_context = lambda: ssl.create_default_context(cafile=certifi.where())状态: ✅ 已应用到 ../spark-skills/github-task-workflow/scripts/ 目录下的脚本
症状:
.git/hooks/目录缺少prepare-commit-msg和post-commit- 提交时不会自动追加
Refs: #issue到提交信息 - 提交后不会自动评论到 GitHub Issue
修复方案: 已安装以下 hooks:
.git/hooks/prepare-commit-msg- 自动追加 issue 引用到提交信息.git/hooks/post-commit- 自动向 GitHub Issue 添加提交评论
症状:
Error: GitHub API error: 403 - {"message":"Resource not accessible by personal access token"}
原因:
当前的 GITHUB_TOKEN 环境变量没有 repo scope 权限,无法创建/更新 issue。
解决方案:
- 访问 https://github.com/settings/tokens
- 创建新的 Personal Access Token (classic)
- 勾选以下权限:
repo- 完全控制仓库(包括创建 issue)
- 更新环境变量:
export GITHUB_TOKEN="ghp_your_new_token_here"
运行以下命令验证修复:
# 测试 SSL 修复(应该返回 403,而不是 SSL 错误)
cd /Users/patrick/innate/spark-cli
python3 ../spark-skills/github-task-workflow/scripts/create_issue.py \
--title "Test" --body "Test" 2>&1
# 如果看到 "Error: GitHub API error: 403",说明 SSL 已修复
# 如果是 "SSL: CERTIFICATE_VERIFY_FAILED",说明修复未生效export GITHUB_TOKEN="ghp_your_token_here"# 方法 A: 使用编排器
python3 ../spark-skills/github-task-workflow/scripts/orchestrate.py init tasks/my-task.md
# 执行代码修改...
python3 ../spark-skills/github-task-workflow/scripts/orchestrate.py finish创建分支时以 issue 编号开头:
git checkout -b 11-feature-name # 11 是 issue 编号这样 hooks 会自动追加 Refs: #11 到提交信息,并自动评论到 issue。
../spark-skills/github-task-workflow/scripts/create_issue.py- 添加 SSL 修复../spark-skills/github-task-workflow/scripts/update_issue.py- 添加 SSL 修复.git/hooks/prepare-commit-msg- 新安装.git/hooks/post-commit- 新安装
.github-task-workflow.yaml- 已配置(repo: variableway/spark-cli).github-task-workflow.active-issue- 包含 issue #11(可能已过期)
- 更新 GITHUB_TOKEN:获取一个有
repo权限的 token - 清理 active-issue:如果 #11 已完成,删除
.github-task-workflow.active-issue - 测试工作流:创建一个新任务文件测试完整流程