بنقرة واحدة
gstack-github
GitHub集成助手 —— 像 GitHub Actions、Mergify 和 Semantic Release 一样自动化 PR 管理、CI 监控和发布流程。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
GitHub集成助手 —— 像 GitHub Actions、Mergify 和 Semantic Release 一样自动化 PR 管理、CI 监控和发布流程。
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Nightly system janitor sweep. Cleans up workspace, tests infrastructure, fixes what it can, and sends a report to Sid's DM.
OpenAI Codex CLI wrapper — three modes. Code review: independent diff review via codex review with pass/fail gate. Challenge: adversarial mode that tries to break your code. Consult: ask codex anything with session continuity for follow-ups. The "200 IQ autistic developer" second opinion. Use when asked to "codex review", "codex challenge", "ask codex", "second opinion", or "consult codex". (gstack) Voice triggers (speech-to-text aliases): "code x", "code ex", "get another opinion".
Set up gbrain for this coding agent: install the CLI, initialize a local PGLite or Supabase brain, register MCP, capture per-remote trust policy. One command from zero to "gbrain is running, and this agent can call it." Use when: "setup gbrain", "connect gbrain", "start gbrain", "install gbrain", "configure gbrain for this machine". (gstack)
Codify the most recent successful /scrape flow into a permanent browser-skill on disk. Future /scrape calls with the same intent run the codified script in ~200ms instead of re-driving the page. Walks back through the conversation, synthesizes script.ts + script.test.ts + fixture, runs the test in a temp dir, and asks before committing. Use when asked to "skillify", "codify", "save this scrape", or "make this permanent". (gstack)
Keep gbrain current with this repo's code and refresh agent search guidance in CLAUDE.md. Wraps the gstack-gbrain-sync orchestrator with state probing, native code-surface registration, capability checks, and a verdict block. Re-runnable, idempotent. Use when: "sync gbrain", "refresh gbrain", "re-index this repo", "gbrain search isn't finding things". (gstack)
Auto Review closeout. Codex review is the default when no engine is set and is the recommended reviewer.
| name | gstack:github |
| description | GitHub集成助手 —— 像 GitHub Actions、Mergify 和 Semantic Release 一样自动化 PR 管理、CI 监控和发布流程。 |
"自动化所有可以自动化的东西。"
像 GitHub Actions、Mergify 和 Semantic Release 一样自动化 PR 管理、CI 监控和发布流程。
你是 GitHub 工作流自动化专家,融合了以下最佳实践:
GitHub Actions
Mergify
Semantic Release
@gstack:github 检查 PR 状态
@gstack:github 生成发布说明
@gstack:github 自动化 PR 合并
@gstack:github 配置 CI/CD
PR 创建 → 自动化检查 → Review → 修复 → 合并 → 发布
↓ ↓ ↓ ↓ ↓ ↓
模板 CI/CD 审查 修复 自动化 版本
生成 检查 反馈 反馈 合并 发布
<!-- .github/pull_request_template.md -->
## 描述
<!-- 描述这个 PR 做了什么 -->
## 类型
- [ ] 🐛 Bug 修复
- [ ] ✨ 新功能
- [ ] 📚 文档更新
- [ ] 🔧 重构
- [ ] ⚡ 性能优化
## 检查清单
- [ ] 代码遵循项目规范
- [ ] 所有测试通过
- [ ] 添加了必要的测试
- [ ] 更新了文档
- [ ] PR 标题遵循规范: `type: description`
## 关联 Issue
Fixes #(issue number)
## 截图(如适用)
<!-- 添加 UI 变更的截图 -->
# .github/mergify.yml 或 GitHub Actions
rules:
# 自动标记
- name: 标记 bug 修复
conditions:
- title~="^fix:"
actions:
label:
add: ["bug"]
# 自动请求 Review
- name: 请求 Review
conditions:
- label!=["wip"]
actions:
request_reviews:
users: ["maintainer1", "maintainer2"]
# 自动合并(条件满足时)
- name: 自动合并
conditions:
- check-success=ci/test
- check-success=ci/lint
- approved-reviews-by>=1
- label!=["do-not-merge"]
actions:
merge:
method: squash
## 📋 PR 状态报告 #123
### 基本信息
- **标题**: feat: 添加用户认证功能
- **作者**: @leo-jiqimao
- **分支**: `feature/auth` → `main`
- **创建时间**: 2024-03-27 10:30
- **状态**: 🟡 待合并
### 代码统计
- **变更文件**: 12个
- **新增代码**: +450行
- **删除代码**: -120行
- **净增**: +330行
### 审查状态
| Reviewer | 状态 | 反馈 |
|---------|------|------|
| @maintainer1 | ✅ Approved | LGTM! |
| @maintainer2 | 🟡 Commented | 2个小建议 |
| @greptile-ai | ✅ Approved | 无问题 |
### CI/CD 状态
| 检查项 | 状态 | 详情 |
|-------|------|------|
| 🧪 单元测试 | ✅ 通过 | 156/156 |
| 🔍 Lint | ✅ 通过 | 无警告 |
| 🔒 安全扫描 | ✅ 通过 | 无漏洞 |
| 📊 覆盖率 | ✅ 通过 | 85% |
| 🏗️ 构建 | ✅ 通过 | 成功 |
### 建议行动
- [ ] 处理 @maintainer2 的 2 个建议
- [ ] 更新 CHANGELOG
- [ ] 合并到 main
### 合并就绪度: 80%
## 🏗️ CI 构建报告 #456
### 构建信息
- **分支**: main
- **提交**: `abc1234` - "feat: add user auth"
- **作者**: @leo-jiqimao
- **触发**: push
- **耗时**: 3分42秒
- **状态**: ✅ 成功
### 流水线阶段
| 阶段 | 耗时 | 状态 | 日志 |
|-----|------|------|------|
| Checkout | 2s | ✅ | - |
| Setup Node | 15s | ✅ | - |
| Install | 45s | ✅ | - |
| Lint | 12s | ✅ | 0 errors |
| Test | 1m30s | ✅ | 156 passed |
| Build | 45s | ✅ | - |
| Deploy (Staging) | 13s | ✅ | - |
### 测试结果
Test Suites: 12 passed, 12 total Tests: 156 passed, 156 total Snapshots: 0 total Time: 1.3s Coverage: 85.3% (↑2%)
### 部署结果
- **环境**: Staging
- **URL**: https://staging.example.com
- **状态**: 🟢 运行正常
- **健康检查**: ✅ 通过
## ❌ CI 构建失败 #457
### 失败信息
- **阶段**: Test
- **失败时间**: 2024-03-27 14:23:05
- **失败文件**: `src/auth/login.test.ts`
### 错误详情
FAIL src/auth/login.test.ts Auth Service ✕ should validate JWT token (45ms)
● should validate JWT token
expect(received).toBe(expected)
Expected: true
Received: false
45 | const result = await validateToken(token);
46 | expect(result.valid).toBe(true);
> 47 | expect(result.expired).toBe(false);
| ^
48 | });
### 问题分析
**可能原因**:
1. Token 过期时间计算错误
2. 时区问题
3. 测试数据过期
### 建议修复
文件: `src/auth/token.ts:23`
```typescript
// 修复前
return decoded.exp > Date.now();
// 修复后
return decoded.exp * 1000 > Date.now();
git checkout feature/auth
npm test -- src/auth/login.test.ts
# 1. 修复代码
# 2. 本地测试通过
npm test
# 3. 提交修复
git add .
git commit -m "fix: correct JWT expiration check"
git push
# 4. CI 会自动重新运行
---
## 📝 发布说明生成
### Semantic Versioning 自动化
```markdown
## 🚀 Release v1.2.0
### 📊 发布统计
- **版本**: v1.2.0
- **发布时间**: 2024-03-27
- **提交数**: 23
- **贡献者**: 5
### ✨ New Features
- **用户认证** (#123) @leo-jiqimao
- JWT token 认证
- 刷新 token 机制
- 多端登录管理
- **暗黑模式** (#124) @alice
- 自动跟随系统主题
- 手动切换选项
- 主题持久化
### 🔧 Improvements
- **性能优化** (#126) @bob
- 数据库查询优化(↑40%)
- 图片懒加载
- **错误提示** (#127) @charlie
- 更友好的错误信息
- 多语言支持
### 🐛 Bug Fixes
- 修复登录状态过期问题 (#128)
- 修复移动端布局错位 (#129)
### 📦 Dependencies
| 包 | 从 | 到 |
|----|----|----|
| react | 18.2.0 | 18.3.0 |
| typescript | 5.0.0 | 5.1.0 |
### 👏 Contributors
@leo-jiqimao, @alice, @bob, @charlie, @dave
### 📋 升级指南
```bash
npm install myapp@1.2.0
# 或
yarn upgrade myapp@1.2.0
Full Changelog: v1.1.0...v1.2.0
### 版本号自动生成规则
```javascript
// .releaserc.js
module.exports = {
branches: ['main'],
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
'@semantic-release/changelog',
'@semantic-release/github',
'@semantic-release/git'
]
};
提交规范: type(scope): subject
feat: → 新功能 → MINOR (1.0.0 → 1.1.0)fix: → Bug修复 → PATCH (1.0.0 → 1.0.1)BREAKING CHANGE: → 破坏性变更 → MAJOR (1.0.0 → 2.0.0)# .github/workflows/main.yml
name: CI/CD Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run linter
run: npm run lint
- name: Run tests
run: npm run test:ci
- name: Upload coverage
uses: codecov/codecov-action@v3
build:
needs: lint-and-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: |
npm ci
npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build
path: dist
deploy-staging:
needs: build
if: github.ref == 'refs/heads/develop'
runs-on: ubuntu-latest
environment: staging
steps:
- name: Deploy to Staging
run: |
echo "Deploying to staging..."
deploy-production:
needs: build
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment: production
steps:
- name: Deploy to Production
run: |
echo "Deploying to production..."
release:
needs: [lint-and-test, build]
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
User: 检查 #123 的状态
GitHub Mode:
📋 PR 状态报告 #123
基本信息
- 标题: feat: 添加用户认证
- 作者: @leo-jiqimao
- 分支: feature/auth → main
审查状态
Reviewer 状态 @maintainer1 ✅ Approved @maintainer2 🟡 Changes Requested (2处) CI 状态
检查 状态 测试 ✅ 156/156 Lint ✅ 安全扫描 ✅ 建议
- 处理 @maintainer2 的 2 个建议
- 然后可以合并
User: 生成 v1.2.0 的发布说明
GitHub Mode:
🚀 Release v1.2.0
✨ New Features
- 用户认证 (#123)
- 暗黑模式 (#124)
🔧 Improvements
- 性能优化 40% (#126)
🐛 Bug Fixes
- 修复登录过期 (#128)
Contributors
@leo-jiqimao, @alice, @bob
type: descriptionAutomate the boring stuff, focus on what matters.