Skip to content

Commit 1d6b674

Browse files
feat(interrupt): include all bot PRs in the Dependabot action items section
Widen the open-bot PR list beyond Dependabot so GitHub Actions and other bot PRs surface for interrupt review, while keeping automated release PRs in their dedicated section. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 6c0458c commit 1d6b674

3 files changed

Lines changed: 32 additions & 20 deletions

File tree

app/interrupt_rotation.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -379,27 +379,30 @@ def render_issue_action_items(selected_since: date, selected_refresh_nonce: int)
379379
)
380380

381381
st.subheader(
382-
"Open Dependabot PRs",
382+
"Open bot PRs",
383383
help="""
384-
Lists all open dependency update PRs from Dependabot. Please try to review and merge these PRs
385-
if it requires no or only minor changes.
384+
Lists all open PRs from bots (Dependabot, GitHub Actions, etc.), excluding automated release PRs
385+
which have their own section above. Please try to review and merge these PRs if it requires no or
386+
only minor changes.
386387
388+
For Dependabot dependency updates:
387389
- In some cases, the PR will require manually updating the `NOTICES` file by checking out the dependency PR, running `yarn install` in `frontend`, and running `make update-notices` from repo root.
388390
- If our CI indicates that updating the dependency will likely require bigger changes, just close the PR with a brief message and add the dependency to our https://github.com/streamlit/streamlit/blob/develop/.github/dependabot.yml ignore list. [Example PR](https://github.com/streamlit/streamlit/pull/10630)
389391
""",
390392
)
391-
dependabot_prs_df = action_items["open_dependabot_prs"]
392-
if dependabot_prs_df.empty:
393+
bot_prs_df = action_items["open_bot_prs"]
394+
if bot_prs_df.empty:
393395
st.success("Congrats, everything is done here!", icon="🎉")
394396
else:
395397
st.dataframe(
396-
dependabot_prs_df,
398+
bot_prs_df,
397399
width="stretch",
398400
hide_index=True,
399401
column_config={
400402
"Title": st.column_config.TextColumn("Title", width="large"),
401403
"URL": st.column_config.LinkColumn("URL", display_text="Open"),
402404
"Created": st.column_config.DatetimeColumn("Created", format="distance"),
405+
"Author": st.column_config.TextColumn("Author"),
403406
},
404407
)
405408

app/utils/interrupt_data.py

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def _build_interrupt_action_items(
118118
missing_label_prs: list[dict[str, Any]] = []
119119
needs_approval_prs: list[dict[str, Any]] = []
120120
ready_for_review: list[dict[str, Any]] = []
121-
dependabot_prs: list[dict[str, Any]] = []
121+
bot_prs: list[dict[str, Any]] = []
122122
release_prs: list[dict[str, Any]] = []
123123

124124
for issue in issues:
@@ -187,23 +187,25 @@ def _build_interrupt_action_items(
187187
author = pr.get("user", {}).get("login")
188188
labels = {label["name"] for label in pr["labels"]}
189189

190-
if author == "dependabot[bot]" and "do-not-merge" not in labels:
191-
dependabot_prs.append(
190+
# Mirrors the GitHub search `is:pr "[chore] Release" author:app/github-actions is:open`,
191+
# where `app/github-actions` is the `github-actions[bot]` login in the REST payload.
192+
is_release_pr = author == "github-actions[bot]" and pr["title"].startswith(RELEASE_PR_TITLE_PREFIX)
193+
if is_release_pr:
194+
release_prs.append(
192195
{
193196
"Title": pr["title"],
194197
"URL": pr["html_url"],
195198
"Created": pr["created_at"],
196199
}
197200
)
198-
199-
# Mirrors the GitHub search `is:pr "[chore] Release" author:app/github-actions is:open`,
200-
# where `app/github-actions` is the `github-actions[bot]` login in the REST payload.
201-
if author == "github-actions[bot]" and pr["title"].startswith(RELEASE_PR_TITLE_PREFIX):
202-
release_prs.append(
201+
elif author and author.endswith("[bot]") and "do-not-merge" not in labels:
202+
# Dependabot, github-actions, and other bots — release PRs are listed separately above.
203+
bot_prs.append(
203204
{
204205
"Title": pr["title"],
205206
"URL": pr["html_url"],
206207
"Created": pr["created_at"],
208+
"Author": author,
207209
}
208210
)
209211

@@ -258,7 +260,7 @@ def _build_interrupt_action_items(
258260
"high_priority_bugs": pd.DataFrame(high_priority_bugs),
259261
"missing_labels_prs": pd.DataFrame(missing_label_prs),
260262
"prs_needing_approval": pd.DataFrame(needs_approval_prs),
261-
"open_dependabot_prs": pd.DataFrame(dependabot_prs),
263+
"open_bot_prs": pd.DataFrame(bot_prs),
262264
"open_release_prs": pd.DataFrame(release_prs),
263265
"community_prs_ready_for_review": pd.DataFrame(ready_for_review),
264266
"confirmed_bugs_without_repro": pd.DataFrame(bugs_without_repro),
@@ -660,10 +662,13 @@ def get_flaky_tests(since_date: date, min_failures: int = 10, refresh_nonce: int
660662
return pd.DataFrame(data)
661663

662664

663-
def get_open_dependabot_prs(refresh_nonce: int = 0) -> pd.DataFrame:
664-
"""Get open Dependabot PRs without 'do-not-merge' label."""
665+
def get_open_bot_prs(refresh_nonce: int = 0) -> pd.DataFrame:
666+
"""Get open bot PRs (Dependabot, GitHub Actions, etc.) without 'do-not-merge' label.
667+
668+
Automated release PRs are excluded; use `get_open_release_prs` for those.
669+
"""
665670
data = build_interrupt_action_items(date.today(), refresh_nonce=refresh_nonce)
666-
return data["open_dependabot_prs"].copy()
671+
return data["open_bot_prs"].copy()
667672

668673

669674
def get_open_release_prs(refresh_nonce: int = 0) -> pd.DataFrame:

tests/test_interrupt_data.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,13 @@ def test_build_interrupt_action_items_shapes(monkeypatch: pytest.MonkeyPatch) ->
122122
assert set(data["missing_labels_prs"]["Title"]) == {"Needs labels"}
123123
assert set(data["prs_needing_approval"]["Title"]) == {"Needs approval"}
124124
assert set(data["community_prs_ready_for_review"]["Title"]) == {"Needs approval", "Ready for review"}
125-
assert set(data["open_dependabot_prs"]["Title"]) == {"Dependabot update"}
125+
# All bot PRs except automated release PRs (those have their own section).
126+
assert set(data["open_bot_prs"]["Title"]) == {
127+
"Dependabot update",
128+
"[snapshots] Update E2E snapshots for #15693",
129+
}
126130
# Only `github-actions[bot]` PRs with the release title prefix count: the snapshot-update bot
127-
# PR and the human-authored release PR are both excluded.
131+
# PR lands in open_bot_prs instead, and the human-authored release PR is excluded.
128132
assert set(data["open_release_prs"]["Title"]) == {"[chore] Release v1.61.0"}
129133

130134

0 commit comments

Comments
 (0)