Repository navigation
Centralize Rust guard tool-name constants - #14641
Conversation
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
|
@copilot merge main and resolve conflicts |
There was a problem hiding this comment.
🟢 Approval recommended
The refactor preserves behavior, removes the targeted duplicated literals, and includes matching assertions.
0 open findings
What changed in this PR
Centralizes eight Rust guard tool names to prevent classification and labeling drift.
Changes:
- Adds canonical tool-name constants and value assertions.
- Replaces duplicated literals across operation lists, label rules, and tests.
| File | Description |
|---|---|
guards/github-guard/rust-guard/src/tools.rs |
Uses constants in operation buckets and tests. |
guards/github-guard/rust-guard/src/labels/tool_rules.rs |
Uses constants in labeling rules and tests. |
guards/github-guard/rust-guard/src/labels/mod.rs |
Updates the agent-task test reference. |
guards/github-guard/rust-guard/src/labels/constants.rs |
Defines and validates eight canonical names. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…d-tool-names-constants # Conflicts: # guards/github-guard/rust-guard/src/tools.rs Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Merged |
|
@copilot merge main and resolve conflicts |
…d-tool-names-constants # Conflicts: # guards/github-guard/rust-guard/src/labels/mod.rs Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Merged the latest
Merged the latest |
Tool names for key management, workflow toggles, fork sync, and agent-task creation were duplicated across classification and labeling code. Centralize them in
labels::constants::tool_namesto keep those references consistent.