Commit 964ae59
authored
fix(guard): remove unused org-ownership functions blocking release (#4290)
## Problem
The Release workflow ([run
#24740822133](https://github.com/github/gh-aw-mcpg/actions/runs/24740822133))
failed in the `docker` job because the Rust guard build has `-D
warnings` enabled and two functions trigger dead_code warnings:
```
error: function `get_cached_owner_is_org` is never used
--> src/labels/backend.rs:63
error: function `is_repo_org_owned` is never used
--> src/labels/backend.rs:282
```
## Fix
Remove the two unused functions (`get_cached_owner_is_org` and
`is_repo_org_owned`) and their associated tests. These were added for
future org-ownership detection but are never called from production
code.
The cache *setter* (`set_cached_owner_is_org`) is retained — it's called
during `is_repo_private` lookups to populate the owner-type cache for
when these functions are needed later.
## Removed
- `get_cached_owner_is_org()` — private cache reader (line 63)
- `is_repo_org_owned()` — public API (line 282)
- `test_is_repo_org_owned_uses_cache` — test
- `test_is_repo_org_owned_empty_args` — test
## Verification
`make agent-finished` passes (format, build, lint, all tests including
Rust guard).1 file changed
Lines changed: 0 additions & 45 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | 63 | | |
71 | 64 | | |
72 | 65 | | |
| |||
271 | 264 | | |
272 | 265 | | |
273 | 266 | | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | 267 | | |
290 | 268 | | |
291 | 269 | | |
| |||
1217 | 1195 | | |
1218 | 1196 | | |
1219 | 1197 | | |
1220 | | - | |
1221 | | - | |
1222 | | - | |
1223 | | - | |
1224 | | - | |
1225 | | - | |
1226 | 1198 | | |
1227 | 1199 | | |
1228 | 1200 | | |
| |||
1309 | 1281 | | |
1310 | 1282 | | |
1311 | 1283 | | |
1312 | | - | |
1313 | | - | |
1314 | | - | |
1315 | | - | |
1316 | | - | |
1317 | | - | |
1318 | | - | |
1319 | | - | |
1320 | | - | |
1321 | | - | |
1322 | | - | |
1323 | | - | |
1324 | | - | |
1325 | | - | |
1326 | | - | |
1327 | | - | |
1328 | | - | |
1329 | 1284 | | |
1330 | 1285 | | |
1331 | 1286 | | |
| |||
0 commit comments