AgentSkillsCN

fix-docker-openstack-patch

修复 Docker OpenStack 镜像仓库中的失败补丁。在 Renovate PR 出现补丁冲突时使用。

SKILL.md
--- frontmatter
name: fix-docker-openstack-patch
description: Fix a failing patch in a Docker OpenStack image repository. Use when a Renovate PR has patch conflicts.

Context

Docker OpenStack repositories use patches in patches/ to modify upstream code. The commit being checked out can be found in .github/workflows/build.yml. Patches may fail to apply because:

  1. Patch merged upstream - delete the patch
  2. Upstream breaking change - update the patch to apply cleanly

Workflow

Use gh CLI for all GitHub operations.

  1. gh pr checkout the PR
  2. gh run view to find which patch failed
  3. Determine if patch is merged upstream or needs updating:
    • Do not assume a patch is merged upstream - verify by checking the upstream code
    • Confirm the upstream changes match the intent and content of the old patch
  4. Apply the fix:
    • Merged upstream: delete the patch
    • Needs updating: create new patch preserving original intent
  5. Use git:commit-message skill to generate commit message, commit, and git push
  6. gh run watch until build passes (repeat if needed)
  7. gh pr merge once the build passes