Skip to content

Commit c9fa425

Browse files
committed
docs(cursor): expand PR rule for merge checks and Copilot review brief
Made-with: Cursor
1 parent a742dfa commit c9fa425

1 file changed

Lines changed: 36 additions & 22 deletions

File tree

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,59 @@
11
---
2-
description: Before pushing a PR, sync with master and request Copilot review
2+
description: Before pushing a PR, verify no merge issues with master and request Copilot review with a review brief
33
alwaysApply: true
44
---
55

6-
# Pull requests: master sync and Copilot review
6+
# Pull requests: merge health, Copilot review, and review brief
77

8-
When preparing or pushing a PR (or when the user mentions opening a PR), do this **before** the final push:
8+
When preparing or **pushing updates to a PR** (or opening one), do this **before** and **after** push:
99

10-
## 1. Merge conflicts with `master`
10+
## 1. Merge issues with the base branch (`master`)
1111

12-
- Fetch and integrate the default branch so the branch is up to date and conflicts are visible early.
13-
- Use the repo’s default branch name; this project uses **`master`**.
12+
- Fetch and integrate the default branch so conflicts and skew show up **locally** before CI/GitHub.
13+
- This project uses **`master`** as the usual base; if the PR targets another branch, use that instead.
1414

15-
**Commands (run from the feature branch):**
15+
**Before push (from the feature branch):**
1616

1717
```bash
1818
git fetch origin master
1919
git merge origin/master
2020
# or: git rebase origin/master
2121
```
2222

23-
- If merge/rebase reports conflicts, resolve them, run tests if applicable, then continue.
24-
- Optionally compare without merging: `git fetch origin master` then `git log --oneline HEAD..origin/master` to see what would come in.
23+
- If merge/rebase fails, **resolve conflicts**, run tests if the project expects them, then continue.
24+
- After push, confirm the PR is mergeable: GitHub PR page should show **no merge conflicts**; or run `gh pr view <n> --json mergeable,mergeStateStatus` (requires `gh`).
2525

26-
**Never** push a PR branch that has not been checked against current `master` when the PR targets `master`.
26+
**Never** push a PR branch that has **not** been checked against current `origin/master` when the PR targets `master`.
2727

28-
## 2. GitHub Copilot review
28+
If `master` is not the default base, use `origin/HEAD` or the branch shown in GitHub’s base selector.
2929

30-
After the PR exists (or right after push):
30+
## 2. GitHub Copilot review + what to review
3131

32-
- Ask the user to **request a Copilot review** on the PR on GitHub (PR page → **Reviewers** → **Copilot** / **Request review from Copilot**, or the **Copilot** / **Request review** control in the PR UI, depending on org settings).
33-
- If automation is available (e.g. `@copilot` in a comment), mention that as an alternative.
32+
After the PR exists or immediately after you push:
3433

35-
**Reminder text you can give the user:**
36-
“Open the PR on GitHub and request a review from **GitHub Copilot** so it can comment on the diff before merge.”
34+
1. **Request Copilot as a reviewer** (open PR → **Reviewers** → request **Copilot**, or CLI: `gh pr edit <number> --add-reviewer "@copilot"` when supported).
35+
2. **Give Copilot a short description of what to review** so the pass is useful — do not rely on the title alone.
3736

38-
## 3. Short checklist
37+
**Use one of these (prefer a PR comment so it stays on the record):**
3938

40-
1. `git fetch origin master` and merge or rebase onto `origin/master`.
41-
2. Resolve conflicts; build/test if the project has a standard check.
42-
3. Push the branch; open or update the PR.
43-
4. Request **Copilot** review on the PR.
39+
- Add a **comment** on the PR, e.g.
40+
**“@copilot Please review: [2–5 bullets — e.g. correctness of X, edge cases for Y, security of Z, whether tests cover W, style/conventions]. Focus especially on …”**
41+
- Or set / supplement the PR **description** with a **“Review focus for Copilot”** section with the same bullets.
4442

45-
If `master` is not the default branch for this repo, use `origin/HEAD` or the branch shown in GitHub’s branch dropdown instead.
43+
**Example review brief:**
44+
45+
```text
46+
@copilot Review focus:
47+
- Whether the change matches intended behavior in …
48+
- Edge cases: …
49+
- Tests: are … covered?
50+
- Any security or data-handling concerns in …
51+
```
52+
53+
If `@copilot` does not trigger in your org, still leave the **Review focus** section for human reviewers and request **Copilot** via the Reviewers UI.
54+
55+
## 3. Checklist
56+
57+
1. `git fetch origin master` → merge or rebase onto `origin/master`; fix conflicts.
58+
2. Push the branch; confirm PR has **no merge conflicts** with base.
59+
3. Request **Copilot** review; add a **review brief** (comment or PR body) describing what to examine.

0 commit comments

Comments
 (0)