# Skill: create-pr Create a Bitbucket pull request from a PAISY worktree branch. ## Invoked by 🎫 JiraOps mode (or 🪃 Orchestrator delegating to JiraOps) ## Required Inputs | Input | Source | Example | |-------|--------|---------| | `TICKET_KEY` | Jira issue key | `ESIDEPAISY-12081` | | `MODULE` | PAISY module name | `eau`, `eubp`, `svmeldungen` | ## Output - Bitbucket PR created targeting `current` branch - Jira comment with PR link added - BigMind fact stored ## Steps ### 1. Get current branch ```bash cd /Users/pplate/git/paisy- git branch --show-current ``` Expected format: `current/feature//-` or `current/bugfix//-` ### 2. Ensure all changes are committed ```bash cd /Users/pplate/git/paisy- git status ``` If uncommitted changes exist, warn the user before proceeding. ### 3. Push branch to origin ```bash cd /Users/pplate/git/paisy- git push -u origin ``` ### 4. Gather diff statistics ```bash cd /Users/pplate/git/paisy- git diff origin/current --stat git diff origin/current --name-only ``` Use the stats to build the PR description. ### 5. Read Jira ticket for context ```python ticket = retrieve_ticket_details(TICKET_KEY) # Extract: summary, description for PR title/description ``` ### 6. Compose PR title and description PR title format (German): ``` : ``` PR description template (German): ```markdown ## Jira : ## Beschreibung ## Änderungen ### - `` — - `` — ### - `` — ## Tests - Unit-Tests - Integrationstests - Alle Tests bestanden ✅ ## Checkliste - [ ] Code Review durchgeführt - [ ] Tests bestanden - [ ] Flyway-Migrationen geprüft (H2 + Oracle) - [ ] Keine `src.gen/` Änderungen ``` ### 7. Create the pull request ```python create_pull_request( project_key="ESIDEPAISY", repo_slug="paisy", title=f"{TICKET_KEY}: {summary}", description=, from_branch=, to_branch="current" ) ``` ### 8. Add Jira comment with PR link ```python add_comment_to_ticket( issue_key=TICKET_KEY, comment=f"*Pull Request erstellt*\n\nBranch: {BRANCH}\nPR: [PR #{pr_id}|]\n\nÄnderungen: {N} Dateien geändert, {M} neu" ) ``` ### 9. Store in BigMind ```python memory_store_fact( category="codebase", fact=f"{TICKET_KEY}: PR #{pr_id} created — {BRANCH} → current. {N} files changed." ) ``` ## Expected Output - Branch pushed to origin - Bitbucket PR created with German title/description - Jira comment added with PR link - BigMind fact stored ## Error Handling | Error | Resolution | |-------|------------| | Branch not pushed | Run `git push -u origin ` first | | Uncommitted changes | Warn user, suggest `git add` + `git commit` | | PR already exists | Check `list_prs_for_repository` for existing PR from same branch | | Merge conflicts | Run `git fetch origin current && git merge origin/current` in worktree, resolve conflicts | | No diff (empty PR) | Branch is identical to `current` — nothing to merge | ## Conventions - PR title: always starts with `TICKET_KEY:` for Jira auto-linking - PR description: German (matches Jira language) - Target branch: always `current` (never `master` or `main`) - Repo: `project_key="ESIDEPAISY"`, `repo_slug="paisy"` - One PR per ticket — don't create multiple PRs for the same branch ## Language - PR title and description: **German** - Branch names, file paths: English as-is - Jira comment: **German**