Skip to content

Commit 20b816b

Browse files
committed
docs: Add Husky pre-commit hook instructions to repo-management
1 parent d1d4701 commit 20b816b

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

.github/instructions/repo-management.instructions.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ docs(demo): Improve slider labels
2323

2424
Valid types: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `perf`, `test`, `ci`, `build`, `revert`
2525

26+
When the user asks Copilot to "stage and commit", Copilot must:
27+
28+
1. Stage the intended changes.
29+
2. Create a commit using the Conventional Commits format above.
30+
3. Use a sentence-case subject aligned with the repository configuration.
31+
4. Select an appropriate type (and scope when useful) based on the actual changes.
32+
2633
## Release Workflow
2734

2835
1. Commits land on `master` following conventional commit format
@@ -60,7 +67,7 @@ Uses whatever Node version ships with `ubuntu-latest` — no explicit Node setup
6067
| Hook | Action | CI Behavior |
6168
| ------------ | --------------------------- | --------------------- |
6269
| `commit-msg` | `pnpm commitlint --edit $1` | Runs |
63-
| `pre-commit` | `pnpm typecheck` | Skipped (`$CI` guard) |
70+
| `pre-commit` | `pnpm typecheck && pnpm lint` | Skipped (`$CI` guard) |
6471

6572
## Package Publishing
6673

@@ -69,3 +76,13 @@ Only `packages/core` is published. The `"files"` field in its `package.json` con
6976
- `dist/` (compiled JS + declarations)
7077
- `README.md`
7178
- `LICENSE`
79+
80+
### Stage and Commit Instructions
81+
82+
When working in local development, the repository is configured with a Husky pre-commit hook. This hook ensures that tasks such as linting and typechecking are executed before the commit is finalized. As a result, when staging and committing changes, Copilot must wait for these tasks to complete and summarize their output.
83+
84+
#### Steps:
85+
1. Stage the changes using `git add <file>`.
86+
2. Commit the changes using `git commit -m "<commit message>"`.
87+
3. Wait for the pre-commit hook tasks to complete.
88+
4. Summarize the output of the pre-commit hook tasks, including any errors or warnings encountered.

0 commit comments

Comments
 (0)