Create PR
Create a pull request for the current branch with a meaningful description.
GoConnection context
- All PRs must reference the Asana task ID (GC-123 format) in the description
- Branch naming:
feature/GC-123-descricaoorhotfix/GC-123-descricao - 1 required approval before merge (branch protection active on all repos)
- PRs without descriptions will be rejected — description is mandatory for significant changes
- Rúben's PRs always require a description regardless of size
Workflow
1. Read the branch state
gh pr view 2>/dev/null || echo "No PR exists yet"
git log main..HEAD --oneline
git diff main..HEAD --stat
Read the actual diff for any files that are non-obvious. Do not write a description from filenames alone.
2. Determine description requirement
A description is mandatory for:
- Any change touching infrastructure, CI/CD, deploy scripts, or IIS config
- Any change touching auth, credentials, Key Vault, or security-related code
- Any change with more than ~50 lines changed or more than ~3 files
- Hotfixes — the urgency makes context more important, not less
- Any PR from Rúben
A description may be omitted (single sentence title only) for:
- Trivial, self-evident changes: typo fix, rename, single-line config value
- Changes where the branch name and commit message already fully explain the intent
When in doubt, write the description.
3. Write the description
Use this template:
## What
[What this PR does — be concrete. One paragraph or a short list. What changed, what was added, what was removed.]
## Why
[Why this change was needed. Reference the Asana task. What problem does it solve or what requirement does it fulfill.]
Asana: https://app.asana.com/0/[project]/[task-id]
Keep it short and factual. No filler. No "this PR implements..." — just say what it does.
4. Open the PR
gh pr create --title "[title]" --body "[description]" --base main
If the repo has a PR template, respect it — fill in its fields rather than replacing it.
After creating, output the PR URL so the user can open it immediately.
Rules
- Never open a PR to main from a hotfix branch without confirming with the user first
- Never force-push to main or any protected branch
- If CI is failing on the branch, flag it before creating the PR — do not silently open a PR with a broken build
- If a 2MB+ file or binary is in the diff, flag it explicitly and ask whether it belongs in source control
- The Asana task link is required in every description — if you do not have the task ID, ask for it