Skip to content

feat(ci): AI test plan + yad checklist + auto-merge on /test-passed#18

Merged
github-actions[bot] merged 3 commits into
mainfrom
feat/test-checklist-and-skill
Jun 15, 2026
Merged

feat(ci): AI test plan + yad checklist + auto-merge on /test-passed#18
github-actions[bot] merged 3 commits into
mainfrom
feat/test-checklist-and-skill

Conversation

@prostopasta

Copy link
Copy Markdown
Owner

What this adds

AI-generated test plan per PR

  • pr-build.yml calls Claude Haiku (via ANTHROPIC_API_KEY secret) before building the .deb
  • Prompt: analyze commits + diff → generate 3-6 concrete test items
  • Fallback: derive checklist from changed file names (no API key needed)
  • TEST_PLAN embedded in the .deb → installer reads it at test time
  • Checklist also appears in the PR install comment

yad checklist dialog in setup

  • Shows PR-specific items from TEST_PLAN + 4 standard checks
  • All boxes must be ticked before /test-passed is posted
  • Prevents accidental confirmation without checking everything

Auto-merge on /test-passed

  • pr-test-gate.yml (on main): sets check green → waits for all checks → squash-merge + delete branch
  • Works for all future PRs automatically

.claude/commands/test-plan.md skill

  • /test-plan in Claude Code: analyzes current branch, generates checklist, offers to post as PR comment

Setup

Add ANTHROPIC_API_KEY to repo secrets for AI-generated plans.
Without it, the fallback diff-based checklist is used automatically.

pr-build.yml:
- Generate test plan via Claude Haiku before build (ANTHROPIC_API_KEY secret);
  fallback to diff-derived checklist when no key configured
- Embed TEST_PLAN file in .deb so installer shows PR-specific checks
- Cleanup job confirmed working automatically on PR close

xfce-night-switch-setup:
- yad checklist dialog: shows TEST_PLAN items + standard checks
- All boxes must be ticked before /test-passed is posted
- Cron redirected to log file (no more terminal noise)

pr-test-gate.yml:
- After /test-passed: set check green, wait for all checks, squash-merge,
  delete branch (auto-merge from main, not PR branch — issue_comment uses main)

.claude/commands/test-plan.md:
- /test-plan skill: analyzes current branch diffs, generates markdown
  checklist, offers to post as PR comment via gh
Allows using any Anthropic-compatible API endpoint and model:
  ANTHROPIC_BASE_URL  — custom proxy / self-hosted (default: api.anthropic.com)
  ANTHROPIC_MODEL     — any model ID (default: claude-haiku-4-5-20251001)
  ANTHROPIC_API_KEY   — token for the endpoint

README: added Contributing section documenting the three secrets,
custom endpoint setup, and the /test-plan Claude Code skill.
Multi-line PROMPT= string had unindented continuation lines breaking
YAML block scalar parsing. Rewrote using printf for prompt, echo
for PR comment body. Removed duplicate Generate test plan step.
@github-actions

Copy link
Copy Markdown

Test build ready -- PR #18

Install (Ubuntu/Debian/Mint):

wget -q 'https://github.com/prostopasta/xfce-night-switch/releases/download/pr-18-test-ed06dd3/xfce-night-switch_1.3.1-pr.18.ed06dd3_all.deb' -O /tmp/xns-test.deb \
  && sudo dpkg -i /tmp/xns-test.deb \
  && xfce-night-switch-setup

Checklist

  • Panel icon visible after setup
  • Fresh install: setup runs once, no duplicate output
  • No errors in journalctl --user -u xfce-night-switch-startup.service

After verifying all items, confirm by commenting /test-passed -- PR will auto-merge.

@prostopasta

Copy link
Copy Markdown
Owner Author

/test-passed

@github-actions
github-actions Bot merged commit 5e0ce7c into main Jun 15, 2026
3 checks passed
@github-actions
github-actions Bot deleted the feat/test-checklist-and-skill branch June 15, 2026 19:07
prostopasta added a commit that referenced this pull request Jun 28, 2026
)

* feat(ci): AI test plan + yad checklist + /test-passed auto-merge

pr-build.yml:
- Generate test plan via Claude Haiku before build (ANTHROPIC_API_KEY secret);
  fallback to diff-derived checklist when no key configured
- Embed TEST_PLAN file in .deb so installer shows PR-specific checks
- Cleanup job confirmed working automatically on PR close

xfce-night-switch-setup:
- yad checklist dialog: shows TEST_PLAN items + standard checks
- All boxes must be ticked before /test-passed is posted
- Cron redirected to log file (no more terminal noise)

pr-test-gate.yml:
- After /test-passed: set check green, wait for all checks, squash-merge,
  delete branch (auto-merge from main, not PR branch — issue_comment uses main)

.claude/commands/test-plan.md:
- /test-plan skill: analyzes current branch diffs, generates markdown
  checklist, offers to post as PR comment via gh

* fix(ci): support ANTHROPIC_BASE_URL and ANTHROPIC_MODEL secrets

Allows using any Anthropic-compatible API endpoint and model:
  ANTHROPIC_BASE_URL  — custom proxy / self-hosted (default: api.anthropic.com)
  ANTHROPIC_MODEL     — any model ID (default: claude-haiku-4-5-20251001)
  ANTHROPIC_API_KEY   — token for the endpoint

README: added Contributing section documenting the three secrets,
custom endpoint setup, and the /test-plan Claude Code skill.

* fix(ci): fix YAML parse error in pr-build.yml

Multi-line PROMPT= string had unindented continuation lines breaking
YAML block scalar parsing. Rewrote using printf for prompt, echo
for PR comment body. Removed duplicate Generate test plan step.
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