协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
ci-automation【开发与工程】Use when running GitHub Actions locally, creating task runner recipes, generating changelogs from git history, managing GitHub PRs/issues/releases programmatically, or creating encrypted backups
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
| Tool | Purpose | Structured output |
|---|---|---|
| gh | GitHub CLI — PRs, issues, releases, Actions, API | --json on most commands |
| just | Task runner with Makefile-like recipes (Justfile) | N/A (runs commands) |
| act | Run GitHub Actions workflows locally in Docker | Terminal output (mirrors Actions logs) |
| git-cliff | Generate changelogs from conventional commits | --output for file, stdout by default |
| restic | Encrypted incremental backups | --json for JSON status output |
act -j build
act push
act --secret-file .env -j test
act -l
act -P ubuntu-latest=catthehacker/ubuntu:act-latest
Create Justfile:
# List available recipes
default:
@just --list
# Run tests
test:
pytest -v
# Lint and format
lint:
ruff check --fix .
ruff format .
# Build and tag Docker image
build tag="latest":
docker build -t myapp:{{tag}} .
# Deploy to staging
deploy-staging: test lint
./scripts/deploy.sh staging
just test
just build v1.2.3
just --list
git-cliff --output CHANGELOG.md
git-cliff --latest
git-cliff --tag v1.0.0..HEAD
git-cliff --config cliff.toml --output CHANGELOG.md
git-cliff --latest --strip header | gh release create v1.2.3 --notes-file -
gh pr list --json number,title,author,createdAt
gh pr create --title "feat: add new feature" --body "Description of changes"
gh run list --json status,name,conclusion --limit 10
gh run rerun <run-id> --failed
gh issue create --title "Bug: description" --body "Steps to reproduce..." --label bug
gh api repos/{owner}/{repo}/releases --jq '.[0:5] | .[].tag_name'
restic init --repo /path/to/backup
restic backup --repo /path/to/backup --json ./important-data
restic snapshots --repo /path/to/backup --json
restic restore latest --repo /path/to/backup --target /path/to/restore
VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.1.0")
git-cliff --latest --strip header | gh release create "$VERSION" --notes-file - --title "$VERSION"
Each stage: git-cliff generates changelog for latest version, gh creates release with those notes.
act -j test && act -j lint && gh pr create --title "feat: ready for review" --body "Local CI passed (test + lint)"
Each stage: act runs test job, act runs lint job, gh creates PR only if both pass.
restic backup --repo /backup --json ./data && ./scripts/deploy.sh production && curl -sf https://myapp.com/health
Each stage: restic backs up current state, deploy script runs, curl verifies health endpoint.
gh pr list --json number,title,statusCheckRollup --jq '.[] | {pr: .number, title: .title, checks: [.statusCheckRollup[]? | {name: .name, status: .conclusion}]}'
make for task recipes — better syntax, built-in arguments, no tab sensitivitycp operations