pr-merge

Resolve failed Gitea pull request merges with squash-to-merge fallback and override-note posting.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/blucsigma05/tbm-apps-script --skill pr-merge-blucsigma05
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr-merge
Source: https://github.com/blucsigma05/tbm-apps-script/tree/main/.claude/skills/pr-merge
Command: npx skills add https://github.com/blucsigma05/tbm-apps-script --skill pr-merge-blucsigma05

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires curl, git, python3, date, and includes scripts (resource) components.

What problem does it solve?

This Skill removes the guesswork and repeated failure modes involved in merging TBM Gitea pull requests, especially when squash merges fail with HTTP 405 due to rebased/delete-repushed branch quirks.

Core Features & Use Cases

  • Pre-merge verification gate: Confirms PR state and captures the head SHA before any override or merge attempt.
  • LT audit-trail override note ceremony: Posts an override comment before the merge call to satisfy the autonomous-merge contract for hot-file/authorization scenarios.
  • Strategy fallback orchestration: Tries squash first, and automatically falls back to merge when squash returns 405, surfacing diagnostics if both fail.
  • Hot-file and Codex-FAIL safety checks: Enforces the documented “stop if real Codex findings exist” rule to prevent shipping against evidence.

Use case example: When LT authorizes a hot-file PR merge, run this Skill with the PR number and an override reason so the PR is merged reliably even if squash prechecks reject the branch.

Quick Start

Invoke pr-merge with the target PR number and an override reason that matches the LT authorization, then let it post the audit note and perform squash-then-merge fallback automatically.

Frequently Asked Questions about pr-merge

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

FAQPage Schema
Why does my Gitea pull request merge fail with HTTP 405 during a squash merge?

Gitea squash merges can return HTTP 405 due to rebased or delete-repushed branch quirks. This Skill resolves failed merges by automatically falling back to a standard merge strategy when the squash precheck rejects the branch.

How do I merge a Gitea pull request safely when squash prechecks reject the branch?

To merge a Gitea pull request safely, this Skill verifies the PR state and head SHA, posts an LT audit-trail override note, and attempts a squash merge before automatically falling back to a standard merge to bypass precheck rejections.

Do I need Git installed locally to automate a pull request merge using the Gitea API?

Yes, you need Git installed locally because the autonomous-merge contract requires Git credential fill to retrieve your Personal Access Token (PAT) for authenticating the Gitea API calls during the pull request merge.

Can I force merge a hot-file pull request if there are real Codex findings?

No, you cannot force merge if real Codex findings exist. The Skill enforces strict CI safety checks that halt the hot-file pull request merge process to prevent shipping code against evidence of failure.

What is the best way to maintain an audit trail for LT-authorized hot-file PR merges?

The best way to maintain an audit trail is posting an override comment to the Gitea PR before attempting the merge call, satisfying the autonomous-merge contract for hot-file authorization scenarios.

What happens when both squash and standard merge strategies fail on a Gitea PR?

When both squash and standard merge strategies fail on a Gitea PR, the Skill enforces strict failure handling that surfaces detailed diagnostics, ensuring you receive actionable error context instead of silently failing.