Skip to content

Commit 15db10e

Browse files
committed
feat: watch specific dirs in repo
1 parent a46f555 commit 15db10e

File tree

5 files changed

+774
-25
lines changed

5 files changed

+774
-25
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,12 @@ merge mergeable PRs with squash.
149149

150150
Daemon notes:
151151
- On first daemon setup, reviewer shows an interactive checkbox list of repos and saves exclusions by `owner/repo`.
152+
- In daemon init UI, press `f` on a selected repo to open a subdirectory tree popup.
153+
Use `j/k` (or arrows) to move, `Enter` to expand/collapse, and `Space` to mark paths.
152154
- Existing open PRs are seeded as already seen during init, so only newly opened PRs trigger.
153155
- PR updates do not retrigger review; tracking is persisted in `~/.config/reviewer/daemon_state.json`.
156+
- Optional `daemon.repo_subpath_filters` lets you restrict a repo to PRs touching specific subpaths.
157+
Omit a repo (or set an empty list) to monitor all PRs in that repo.
154158

155159
## Configuration
156160

@@ -172,6 +176,10 @@ Daemon state is stored separately in:
172176
"daemon": {
173177
"poll_interval_sec": 60,
174178
"exclude_repos": ["org/legacy-repo"],
179+
"repo_subpath_filters": {
180+
"org/monorepo": ["services/payments", "infra/terraform"],
181+
"org/full-repo": []
182+
},
175183
"initialized": true,
176184
"include_drafts": false
177185
},

src/config.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use anyhow::Result;
22
use serde::{Deserialize, Serialize};
3+
use std::collections::HashMap;
34
use std::path::PathBuf;
45

56
fn default_poll_interval_sec() -> u64 {
@@ -57,6 +58,8 @@ pub struct DaemonConfig {
5758
pub initialized: bool,
5859
#[serde(default)]
5960
pub include_drafts: bool,
61+
#[serde(default)]
62+
pub repo_subpath_filters: HashMap<String, Vec<String>>,
6063
}
6164

6265
impl Default for DaemonConfig {
@@ -66,6 +69,7 @@ impl Default for DaemonConfig {
6669
exclude_repos: Vec::new(),
6770
initialized: false,
6871
include_drafts: false,
72+
repo_subpath_filters: HashMap::new(),
6973
}
7074
}
7175
}

0 commit comments

Comments
 (0)