finishing-a-development-branch

Automate Git branch completion with tests, base-branch selection, and merge or PR actions.

4|Updated Mar 15, 2024
One-click install
npx skills add https://github.com/izyanrajwani/agent-skills-library --skill finishing-a-development-branch-izyanrajwani
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/izyanrajwani/agent-skills-library/tree/main/skills/finishing-a-development-branch
Command: npx skills add https://github.com/izyanrajwani/agent-skills-library --skill finishing-a-development-branch-izyanrajwani

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Finishes development branches by ensuring tests pass, selecting the correct base branch, and orchestrating merge, PR, or cleanup actions.

Core Features & Use Cases

  • Automates test verification and base-branch determination before integrating work.
  • Supports four completion options: local merge, PR creation, preserving the branch for later, or discarding the work.
  • Provides guardrails to prevent merging when tests fail or conflicts remain.

Quick Start

Start by running tests, then determine the base branch and choose one of the four completion options.

Frequently Asked Questions about finishing-a-development-branch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate finishing a Git feature branch with tests and merges?

To finish a Git feature branch, you can automate the process by running tests, detecting the correct base branch via merge-base, and executing a local merge, pull request, cleanup, or preservation action with built-in guardrails against failures.

What is the best way to prevent merging a Git branch when tests fail?

Preventing merges when tests fail requires explicit guardrails during the branch finishing workflow. The process ensures deterministic test execution runs first and blocks destructive merge, pull request, or cleanup actions if conflicts remain or tests do not pass.

How do I determine the correct base branch before creating a pull request?

Determining the correct base branch before creating a pull request is handled automatically using Git merge-base detection. This identifies the originating branch from common bases like main, master, or develop to ensure the pull request targets the correct integration point.

Can I preserve a Git worktree instead of deleting the branch after merging?

Yes, you can preserve a Git worktree instead of deleting the branch. The branch finishing workflow supports four completion options, including preserving the branch for later work, alongside local merge, pull request creation, or complete branch deletion.

Does branch finishing work with repositories using develop as the base branch?

Yes, branch finishing works with repositories using develop as the base branch. The workflow applies to feature branches in Git repositories with common base branches such as main, master, or develop, automatically detecting the correct target for merges.