Przejdź do treści
Biblioteka skilli
Programowanie · Automatyzacja

hotfix-deploy

/hotfix-deploy

Prowadzi pełny workflow pilnej poprawki na gałęzi produkcyjnej (coop-production, rh-production i podobne): gałąź, poprawka, commit, push i pull request kierowany na gałąź produkcyjną, z pominięciem normalnego potoku.

Repozytorium
hmis ↗
Licencja
GPL-3.0
Ostatnia zmiana repozytorium
26.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

GPL-3.0, otwarta.

Co robi i kiedy

Prowadzi pełny workflow pilnej poprawki na gałęzi produkcyjnej (coop-production, rh-production i podobne): gałąź, poprawka, commit, push i pull request kierowany na gałąź produkcyjną, z pominięciem normalnego potoku.

Argumenty

/hotfix-deploy <prod-branch> <description>
Oryginalny opis (EN)

Full hotfix workflow for deploying urgent fixes to a production branch (coop-production, rh-production, southernlanka-staging, etc.). Covers branch creation, fix, commit, push, and PR targeting the production branch. Use when you need to apply an urgent fix directly to a production environment without going through the normal development → QA → prod pipeline. The agent may invoke this on its own judgment to prepare a hotfix (branch, fix, commit, push, PR) — merging the PR, which is what actually triggers CI/CD deployment, remains a manual human action.

Jak działa

  1. Arguments
  2. Critical Rule
  3. Step 1 — Stash Any Uncommitted Work
  4. Step 2 — Create Hotfix Branch from Production
  5. Step 3 — Apply the Fix
  6. Step 4 — Pre-Commit Checklist
  7. Step 5 — Commit
  8. Step 6 — Push
  9. Step 7 — Create PR Targeting the Production Branch
  10. Step 8 — Restore Stashed Work
Sekcje z nagłówków SKILL.md, w oryginale · 118 linii, 446 słów
Podgląd SKILL.md
---
name: hotfix-deploy
description: >
  Full hotfix workflow for deploying urgent fixes to a production branch
  (coop-production, rh-production, southernlanka-staging, etc.). Covers branch creation,
  fix, commit, push, and PR targeting the production branch. Use when you need
  to apply an urgent fix directly to a production environment without going
  through the normal development → QA → prod pipeline. The agent may invoke
  this on its own judgment to prepare a hotfix (branch, fix, commit, push,
  PR) — merging the PR, which is what actually triggers CI/CD deployment,
  remains a manual human action.
allowed-tools: Bash, Read, Grep, Edit, Write
argument-hint: "<prod-branch> <description>"
---

# Hotfix Deployment Workflow

Deploy an urgent fix directly to a production branch.

## Arguments

- `$0` — Target production branch (e.g., `coop-production`, `rh-production`, `southernlanka-staging`)
- `$1` — Short description of the fix (e.g., `sequence-preallocation`, `critical-billing-fix`)

## Critical Rule

**The branch name MUST end with `-hotfix`.**
CI merge validation will block PRs from branches that do not end with `-hotfix`.

## Step 1 — Stash Any Uncommitted Work

```bash
git stash
```

## Step 2 — Create Hotfix Branch from Production

```bash
git fetch origin
git checkout -b $1-hotfix origin/$0
```

Branch name format: `<description>-hotfix`

Examples:
- `sequence-preallocation-hotfix`
- `critical-billing-fix-hotfix`
- `persistence-tuning-hotfix`

## Step 3 — Apply the Fix

Make only the minimal changes required. Do NOT port unrelated features or refactors.

Before editing `persistence.xml`, compare against the target production branch to understand the current state:
```bash
git show origin/$0:src/main/resources/META-INF/persistence.xml
```

## Step 4 — Pre-Commit Checklist

- [ ] `persistence.xml` uses `${JDBC_DATASOURCE}` / `${JDBC_AUDIT_DATASOURCE}` — not hardcoded JNDI names (e.g., `jdbc/coop`)
- [ ] No credentials or sensitive files staged
- [ ] Changes are minimal — only what is needed for the hotfix

> **Note:** The `persistence.xml` on production branches typically uses `${JDBC_DATASOURCE}` environment variable placeholders, while the local development `persistence.xml` has hardcoded JNDI names (e.g., `jdbc/coop`). Never copy the hardcoded JNDI name into the production branch.

## Step 5 — Commit

```bash
git add <changed-files>
git commit -m "fix: <description of fix>

<Explanation of why this was needed and what it fixes.>
References issues #NNNN.

Co-Authored-By: Codex <noreply@openai.com>"
```

## Step 6 — Push

```bash
git push origin $1-hotfix
```

## Step 7 — Create PR Targeting the Production Branch

```bash
gh pr create \
  --title "fix: <description>" \
  --base $0 \
  --head $1-hotfix \
  --body "..."
```

The PR **must** target `$0` (the production branch), not `development` or `master`.

The body is public: state the defect, the fix and the deploy note, and keep the
affected hospital's record counts, production bill numbers, schema names and
data-fix steps out of it. See
[What May Go Into a GitHub Issue, PR, or Comment](../../../developer_docs/git/github-public-content-policy.md).

## Step 8 — Restore Stashed Work

```bash
git checkout <your-previous-branch>
git stash pop
```

## Step 9 — Clean Up Old Branch (Post-Merge)

After the PR is merged:
```bash
git branch -d $1-hotfix
```

## Common Production Branches

| Hospital/Environment | Branch         |
|----------------------|----------------|
| COOP pharmacy        | `coop-production` |
| COOP inward          | `coop-staging`    |
| Ruhunu hospital      | `rh-production`   |
| Southern Lanka (live)| `southernlanka-staging` |

Full map: `developer_docs/deployment/ci-cd-pipeline-overview.md`. CI's `-hotfix`
head check does not yet run for these targets (#24453); follow the naming rule anyway.

## Reference

- [Commit Conventions — Hotfix Branches](../../../developer_docs/git/commit-conventions.md#hotfix-branches)
- [Production Deployment Guide](../hmis.wiki/Deployment/Production-Deployment-Guide.md)

Wersje

RepozytoriumWynikLicencja
Ta strona · hmislk/hmis100GPL-3.0
hmislk/hmis100GPL-3.0

Migawka bazy z 13.11.2026 · wersja paczki 3ee0082eaf48 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 95tl-hotfix
    Wypycha pilną poprawkę na gałąź main: przenosi zmiany do gałęzi hotfix, waliduje je i otwiera pull request z auto-scaleniem.
  • 95nacl-tl-hotfix
    Wdraża pilną poprawkę do main: przenosi zmiany do gałęzi hotfix, waliduje je i otwiera pull request.
  • 90commit-push-current
    Commituje i wypycha bieżącą gałąź, także bezpośrednio do domyślnej, bez tworzenia gałęzi i pull requesta, na polecenie człowieka.
  • 100hotfix
    Wdraża pilną poprawkę produkcyjną: minimalna zmiana, celowane testy i pull request, gdy błąd musi trafić na main od razu.
  • 90commit-push-current
    Commituje i wypycha zmiany do bieżącej gałęzi na prośbę człowieka, bez tworzenia gałęzi i pull requestu.
  • 100hotfix
    Prowadzi workflow hotfixa: tworzy gałąź hotfix, nanosi celową poprawkę, uruchamia weryfikację i przygotowuje artefakty wydania, gdy krytyczny błąd produkcyjny wymaga natychmiastowej łatki.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.