From cd8fb95ca6562ccf3a95718514a9e8236ce809b8 Mon Sep 17 00:00:00 2001 From: Ryan Bright Date: Fri, 17 Apr 2026 21:00:57 -0600 Subject: [PATCH 1/3] fix(github): focus notifier on review requests Use a stricter default PR query so Waybar only counts PRs requesting my review and excludes PRs authored by me. Also updates status/tooltip wording and adds a config regression test for the default query contract. --- modules/github/src/app.rs | 4 ++-- modules/github/src/config.rs | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/modules/github/src/app.rs b/modules/github/src/app.rs index 9223661..f8f3cf1 100644 --- a/modules/github/src/app.rs +++ b/modules/github/src/app.rs @@ -99,7 +99,7 @@ fn build_status(config: &Config) -> Result { Ok(result) => { save_items(&config.items_path, &result.items)?; let status_line = if result.count > 0 { - "Open pull requests" + "Pull requests requiring review" } else { "No matching pull requests" } @@ -134,7 +134,7 @@ fn build_status(config: &Config) -> Result { } fn build_tooltip(result: &crate::github::FetchResult) -> String { - let mut lines = vec![format!("GitHub pull requests: {}", result.count)]; + let mut lines = vec![format!("GitHub review requests: {}", result.count)]; for item in &result.items { lines.push(format!( "{} #{}: {}", diff --git a/modules/github/src/config.rs b/modules/github/src/config.rs index d2d52ca..624f960 100644 --- a/modules/github/src/config.rs +++ b/modules/github/src/config.rs @@ -5,6 +5,8 @@ use anyhow::Result; use waybar_core::{XdgDirs, env_parse, env_value, load_env_file}; const MAX_ACTION_ITEMS: usize = 12; +const DEFAULT_PR_QUERY: &str = + "is:open is:pr review-requested:@me -author:@me archived:false sort:updated-desc"; #[derive(Debug, Clone, PartialEq, Eq)] pub struct Config { @@ -48,9 +50,7 @@ impl Config { ) .unwrap_or_else(|| format!("{}/graphql", api_url.trim_end_matches('/'))); let pr_query = env_value(&file_env, &["WAYBAR_GITHUB_PR_QUERY", "PR_QUERY"]) - .unwrap_or_else(|| { - "is:open is:pr involves:@me archived:false sort:updated-desc".into() - }); + .unwrap_or_else(|| DEFAULT_PR_QUERY.into()); let max_items = env_parse::(&file_env, &["WAYBAR_GITHUB_MAX_ITEMS", "MAX_ITEMS"]) .map_or(8, |value| value.clamp(1, MAX_ACTION_ITEMS)); let timeout = Duration::from_secs( @@ -84,3 +84,14 @@ impl Config { }) } } + +#[cfg(test)] +mod tests { + use super::DEFAULT_PR_QUERY; + + #[test] + fn default_query_targets_external_review_requests() { + assert!(DEFAULT_PR_QUERY.contains("review-requested:@me")); + assert!(DEFAULT_PR_QUERY.contains("-author:@me")); + } +} From 251598f450bdf2f0e4fcf0a49d8bb647cb90c287 Mon Sep 17 00:00:00 2001 From: Ryan Bright Date: Fri, 17 Apr 2026 21:01:00 -0600 Subject: [PATCH 2/3] docs(github): describe review-only default query Document the new default GitHub PR query and clarify that authored PRs are excluded by default. --- README.md | 2 +- modules/github/README.md | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5548673..9dfc428 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Standalone Waybar module backends. ## Modules - `modules/agent-usage` — Codex and Claude usage -- `modules/github` — open GitHub pull requests +- `modules/github` — GitHub pull requests that request your review - `modules/linear` — unread Linear notifications - `modules/schedule` — upcoming meetings from Google Calendar diff --git a/modules/github/README.md b/modules/github/README.md index c895a80..56ef961 100644 --- a/modules/github/README.md +++ b/modules/github/README.md @@ -4,7 +4,7 @@ GitHub pull request module. ## Includes -- Fetch open pull requests for the current user +- Fetch open pull requests that request your review (excluding your own authored PRs by default) - Write Waybar output and a Gtk menu file - Open the dashboard or a selected item @@ -17,6 +17,17 @@ GitHub pull request module. | `cargo test -p waybar-github` | Run this package only | | `nix run 'path:.#github' -- status` | Run the status command | +## Query behavior + +Default search query: + +```text +is:open is:pr review-requested:@me -author:@me archived:false sort:updated-desc +``` + +Override with `WAYBAR_GITHUB_PR_QUERY` (or `PR_QUERY`) in `github-pull-requests.env`. +If your agents use dedicated bot accounts, append additional `-author:` qualifiers. + ## Usage ```bash From 7343a5c751493b2ab4afcdd8d5d17684478987eb Mon Sep 17 00:00:00 2001 From: Ryan Bright Date: Fri, 17 Apr 2026 21:16:19 -0600 Subject: [PATCH 3/3] fix(deps): patch rustls-webpki security advisory Update rustls-webpki from 0.103.10 to 0.103.12 to address RUSTSEC-2026-0098 and RUSTSEC-2026-0099 flagged by CI deps-check. --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 02a0842..b1b160b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1323,9 +1323,9 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.103.10" +version = "0.103.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df33b2b81ac578cabaf06b89b0631153a3f416b0a886e8a7a1707fb51abbd1ef" +checksum = "8279bb85272c9f10811ae6a6c547ff594d6a7f3c6c6b02ee9726d1d0dcfcdd06" dependencies = [ "aws-lc-rs", "ring",