|
22 | 22 |
|
23 | 23 | Both accounts are configured in the `gh` CLI on this machine. |
24 | 24 |
|
25 | | -## PR Workflow |
| 25 | +## Complete Workflow — follow every step in order |
26 | 26 |
|
27 | | -Always follow this pattern when pushing branches and creating PRs: |
| 27 | +**1. Create an issue first** (as `chrisjwalk`, the default account): |
| 28 | + |
| 29 | +```bash |
| 30 | +gh issue create --title "..." --body "..." |
| 31 | +# note the issue number, e.g. #42 |
| 32 | +``` |
| 33 | + |
| 34 | +**2. Create a branch** referencing the issue: |
| 35 | + |
| 36 | +```bash |
| 37 | +git checkout -b feat/short-description-42 |
| 38 | +``` |
| 39 | + |
| 40 | +**3. Implement, commit** (git is configured to commit as `chrisjwalk-bot`): |
| 41 | + |
| 42 | +```bash |
| 43 | +git commit -m "feat: description (closes #42) |
| 44 | +
|
| 45 | +Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>" |
| 46 | +``` |
| 47 | + |
| 48 | +**4. Push and open PR as `chrisjwalk-bot`**: |
28 | 49 |
|
29 | 50 | ```bash |
30 | | -# 1. Switch to bot before pushing |
31 | 51 | gh auth switch --user chrisjwalk-bot |
32 | | -git push origin <branch> |
33 | | -gh pr create ... |
| 52 | +git push origin feat/short-description-42 |
| 53 | +gh pr create --title "..." --body "Closes #42 ..." |
| 54 | +``` |
| 55 | + |
| 56 | +**5. Switch back to owner**: |
34 | 57 |
|
35 | | -# 2. Switch back to owner account afterwards |
| 58 | +```bash |
36 | 59 | gh auth switch --user chrisjwalk |
37 | 60 | ``` |
38 | 61 |
|
| 62 | +> ⚠️ Never open a PR without a corresponding issue. Never push as `chrisjwalk-bot` without switching back to `chrisjwalk` afterwards. |
| 63 | +
|
39 | 64 | ## Git Commit Identity |
40 | 65 |
|
41 | 66 | Git is configured locally in this repo to commit as the bot: |
42 | 67 |
|
43 | 68 | - `user.name` = `chrisjwalk-bot` |
44 | 69 | - `user.email` = `268224883+chrisjwalk-bot@users.noreply.github.com` |
45 | 70 |
|
46 | | -## Issue Workflow |
47 | | - |
48 | | -Create issues as `chrisjwalk` (the default active account). Always create a GitHub issue before starting work on a feature or fix, and reference it in the branch name and PR. |
49 | | - |
50 | 71 | # Coding Conventions |
51 | 72 |
|
52 | 73 | ## Styling: Tailwind over CSS |
|
0 commit comments