diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 2177af1d..66045f68 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -1,5 +1,7 @@ # Use `git config blame.ignorerevsfile .git-blame-ignore-revs` to make `git blame` ignore the following commits. +# Or add '-C' to git-blame(1) to get around this/these commit(s) # Urgau 2026-02-23 17:44 Split `github.rs` file into multiple smaller sub-modules -# Please add '-C' to git-blame(1) to get around this commit 00127fd78e4571fbdb7b5b5d41b73ebf3bf4e895 +# Urgau 2026-02-23 17:44 Adjust GitHub module splitting after review comments +a74d4afb004a2af5d04a900511ce0dea1a9aa91f diff --git a/README.md b/README.md index cd4477fe..a1c60a18 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ If you want a test Zulip instance, you can [register a free one](https://zulip.c - Configure a [webhook forwarding service](#configure-webhook-forwarding) - Create in your Zulip instance an outgoing webhook bot, binding it to the forwarding address created before. - Launch your local triagebot setting `ZULIP_WEBHOOK_SECRET` to the webhook bot `token` value (you get that as part of the Zulip bot configuration) -- Set other Zulip env vars as needed (see example in `.env.sample`). +- Set other Zulip env vars as needed (see example in `.env.sample`): specifically you will need `TEAMS_API_URL` to point to a host with custom Zulip user mappings (relevant file: `zulip_map.json`). You can also simulate a Zulip webhook payload with `cURL`. For example, this is the payload sent to the triagebot server when tagging a Zulip bot in a stream. ``` sh diff --git a/src/actions.rs b/src/actions.rs index 80795784..5e717d17 100644 --- a/src/actions.rs +++ b/src/actions.rs @@ -46,6 +46,7 @@ pub struct IssueDecorator { pub repo_name: String, pub labels: String, pub author: String, + pub team: String, pub assignees: String, // Human (readable) timestamp pub updated_at_hts: String, diff --git a/src/agenda.rs b/src/agenda.rs index e1c958b6..461eaa51 100644 --- a/src/agenda.rs +++ b/src/agenda.rs @@ -103,7 +103,17 @@ pub fn prioritization() -> Box { query: Arc::new(IssueQuery { filters: vec![("state", "open")], include_labels: vec!["proposed-final-comment-period", "T-compiler"], - exclude_labels: vec!["t-libs", "t-libs-api", "t-rustdoc"], + exclude_labels: vec![ + "I-lang-nominated", + "I-libs-nominated", + "S-blocked", + "S-waiting-on-author", + "S-waiting-on-t-lang", + "S-waiting-on-t-libs", + "T-libs", + "T-libs-api", + "T-rustdoc", + ], }), }, QueryMap { @@ -112,7 +122,17 @@ pub fn prioritization() -> Box { query: Arc::new(IssueQuery { filters: vec![("state", "open")], include_labels: vec!["final-comment-period", "T-compiler"], - exclude_labels: vec!["t-libs", "t-libs-api", "t-rustdoc"], + exclude_labels: vec![ + "I-lang-nominated", + "I-libs-nominated", + "S-blocked", + "S-waiting-on-author", + "S-waiting-on-t-lang", + "S-waiting-on-t-libs", + "T-libs", + "T-libs-api", + "T-rustdoc", + ], }), }, QueryMap { @@ -129,24 +149,17 @@ pub fn prioritization() -> Box { "t-libs", "t-libs-api", "t-rustdoc", + "t-rustdoc-frontend", "t-lang", "t-style", + "S-waiting-on-author", + "S-waiting-t-lang", + "S-waiting-t-libs", + "I-lang-nominated", + "I-libs-nominated", ], }), }, - QueryMap { - name: "fcp_finished_not_tcompiler", - kind: QueryKind::List, - query: Arc::new(IssueQuery { - filters: vec![("state", "all")], - include_labels: vec![ - "finished-final-comment-period", - "disposition-merge", - "to-announce", - ], - exclude_labels: vec!["t-libs", "t-libs-api", "t-rustdoc", "t-compiler"], - }), - }, ], }, Query { diff --git a/src/github/issue_query.rs b/src/github/issue_query.rs index d0916bfd..b7fb89f9 100644 --- a/src/github/issue_query.rs +++ b/src/github/issue_query.rs @@ -161,17 +161,25 @@ impl IssuesQuery for Query<'_> { None }; + let labels = issue + .labels + .iter() + .map(|l| l.name.as_ref()) + .collect::>(); + + // guess the team this issue belongs to: + // get the first T-* label associated with it + let t_label = labels + .iter() + .find(|s| s.starts_with("T-")) + .map_or("", |v| v); + issues_decorator.push(crate::actions::IssueDecorator { title: issue.title.clone(), number: issue.number, html_url: issue.html_url.clone(), repo_name: repo.name().to_owned(), - labels: issue - .labels - .iter() - .map(|l| l.name.as_ref()) - .collect::>() - .join(", "), + labels: labels.join(","), assignees: issue .assignees .iter() @@ -179,6 +187,7 @@ impl IssuesQuery for Query<'_> { .collect::>() .join(", "), author: issue.user.login, + team: t_label.to_string(), updated_at_hts: crate::actions::to_human(issue.updated_at), fcp_details, mcp_details, @@ -325,6 +334,7 @@ impl IssuesQuery for LeastRecentlyReviewedPullRequests { repo_name: repo_name.to_string(), labels, author, + team: "UNUSED".to_string(), assignees, updated_at_hts, fcp_details: None, diff --git a/templates/_issue.tt b/templates/_issue.tt index f14ffd49..24006e7e 100644 --- a/templates/_issue.tt +++ b/templates/_issue.tt @@ -1,11 +1,14 @@ -{% macro render(issue, with_age="", backport_branch="") %}{% if issue.is_blocked %}[blocked]{% endif %} "{{issue.title}}" [{{issue.repo_name}}#{{issue.number}}]({{issue.html_url}}){% if issue.mcp_details.zulip_link %} ([Zulip]({{issue.mcp_details.zulip_link}})){% endif %}{% if with_age %} (last review activity: {{issue.updated_at_hts}}){%- endif -%} +{% macro render(issue, with_age="", with_team_tag="", backport_branch="") %} +{%- if with_team_tag %}[{{issue.team}}] {% endif %} +{%- if issue.is_blocked %}[blocked] {% endif %}"{{issue.title}}" [{{issue.repo_name}}#{{issue.number}}]({{issue.html_url}}) +{%- if issue.mcp_details.zulip_link %} ([Zulip]({{issue.mcp_details.zulip_link}})){% endif %} +{%- if with_age %} (last review activity: {{issue.updated_at_hts}}){%- endif -%} {%- if backport_branch != "" %} - Authored by {{ issue.author }} - Voting [Zulip topic](#) {%- endif -%} {% if issue.mcp_details.concerns %}{%- for concern in issue.mcp_details.concerns %} diff --git a/templates/_issues.tt b/templates/_issues.tt index da42f85a..40f0ff0d 100644 --- a/templates/_issues.tt +++ b/templates/_issues.tt @@ -1,7 +1,7 @@ {% import "_issue.tt" as issue %} -{% macro render(issues, indent="", backport_branch="", with_age=false, empty="No issues at this time.") %} +{% macro render(issues, indent="", backport_branch="", with_age=false, with_team_tag=false, empty="No issues at this time.") %} {%- for issue in issues %} -{{indent}}- {{ backport_branch }}{{issue::render(issue=issue, with_age=with_age, backport_branch=backport_branch)}}{% else %} +{{indent}}- {{ backport_branch }}{{issue::render(issue=issue, with_age=with_age, with_team_tag=with_team_tag, backport_branch=backport_branch)}}{% else %} {{indent}}- {{empty}}{% endfor -%} {% endmacro %} diff --git a/templates/prioritization_agenda.tt b/templates/prioritization_agenda.tt index 8d0b71c1..88addd1e 100644 --- a/templates/prioritization_agenda.tt +++ b/templates/prioritization_agenda.tt @@ -14,7 +14,7 @@ note_id: xxx - (TIP) add here non-recurrent scheduled meetings, [check the schedule calendar](https://github.com/rust-lang/calendar) - (TIP) mention upcoming Rust stable releases, [check the release calendar](https://calendar.google.com/calendar/htmlembed?src=l1b1gkqvfbgunjs18nemq4c580%40group.calendar.google.com) -- Reminder: if you see a PR/issue that seems like there might be legal implications due to copyright/IP/etc, please let us know (or at least message @_**davidtwco** or @_**Wesley Wiser** so we can pass it along). +- Reminder: if you see a PR/issue that seems like there might be legal implications due to copyright/IP/etc, please let us know (or at least message @_**davidtwco** or @_**Boxy** so we can pass it along). ### Other WG meetings @@ -37,9 +37,7 @@ note_id: xxx - MCPs blocked on unresolved concerns - - Finalized FCPs (disposition merge) -{{-issues::render(issues=fcp_finished_tcompiler, indent=" ", empty="No new finished FCP (disposition merge) this time.")}} -- Other teams finalized FCPs -{{-issues::render(issues=fcp_finished_not_tcompiler, indent=" ", empty="No new finished FCP (disposition merge) this time.")}} +{{-issues::render(issues=fcp_finished_tcompiler, indent=" ", with_age=false, with_team_tag=true, empty="No new finished FCP (disposition merge) this time.")}} ## Backport nominations