Skip to content

Commit a1c0207

Browse files
generatedunixname938843965664645meta-codesync[bot]
authored andcommitted
Update implementation-guide.md (+1 more) for fbcode/eden/mononoke/.llms
Reviewed By: lmvasquezg Differential Revision: D109927020 fbshipit-source-id: 9770add0bbd173a810c2be553b4725440016ffb2
1 parent e6a69ea commit a1c0207

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎eden/mononoke/.llms/skills/write-hook/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Create a Mononoke server-side hook with 3-diff split (tests, wiring
44
metadata:
55
oncalls: ['scm_server_infra']
66
strict: true
7-
apply_to_path: 'eden/mononoke/features/hooks/src/implementations/.*\.rs$'
7+
apply_to_path: 'eden/mononoke/features/hooks/src/(facebook/)?implementations/.*\.rs$'
88
apply_to_user_prompt: '.*(write|create|add|new|implement).*(mononoke\s+)?hook.*'
99
---
1010

‎eden/mononoke/.llms/skills/write-hook/references/implementation-guide.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
| What | Path |
66
|------|------|
7-
| Hook implementations | `fbcode/eden/mononoke/features/hooks/src/implementations/` |
8-
| Hook registration | `fbcode/eden/mononoke/features/hooks/src/implementations.rs` |
7+
| OSS hook implementations | `fbcode/eden/mononoke/features/hooks/src/implementations/` |
8+
| Facebook-only hook implementations | `fbcode/eden/mononoke/features/hooks/src/facebook/implementations/` |
9+
| OSS hook registration | `fbcode/eden/mononoke/features/hooks/src/implementations.rs` |
10+
| Facebook-only hook registration | `fbcode/eden/mononoke/features/hooks/src/facebook/implementations.rs` |
911
| BUCK | `fbcode/eden/mononoke/features/hooks/BUCK` |
1012
| Cargo.toml | `fbcode/eden/mononoke/features/hooks/Cargo.toml` |
1113
| Autocargo Cargo.toml | `fbcode/eden/mononoke/public_autocargo/features/hooks/Cargo.toml` |
@@ -34,7 +36,7 @@ Split the work into 3 commits on a stack:
3436
- New file `implementations/<hook_name>.rs` with:
3537
- Config struct with `#[derive(Deserialize, Clone, Debug)]`
3638
- Hook struct with `new(config: &HookConfig)` and `with_config(config: Config)`
37-
- No-op `run()` that returns `Ok(HookExecution::accepted())` (`HookExecution` is a struct wrapping a `HookResult` plus `extra_logs`; build it with the `accepted()` / `rejected(info)` constructors)
39+
- No-op `run()` returning `Ok(HookExecution::accepted())`. `HookExecution` wraps a `HookResult` plus `extra_logs`; build with `accepted()` / `rejected(info)`, or `*_with_logs` variants to attach Scuba diagnostic lines.
3840
- `implementations.rs`: add `mod <hook_name>;` line only (NOT the match arm)
3941
- No tests, no BUCK/Cargo changes (skeleton has minimal imports)
4042

0 commit comments

Comments
 (0)