Skip to content

Create script that flags PRs for triage, the same way as for a2ui.#990

Open
polina-c wants to merge 5 commits into
flutter:mainfrom
polina-c:flag-for-triage
Open

Create script that flags PRs for triage, the same way as for a2ui.#990
polina-c wants to merge 5 commits into
flutter:mainfrom
polina-c:flag-for-triage

Conversation

@polina-c

@polina-c polina-c commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

What

Adds an automation that flags stale, externally-authored pull requests with the status: needs-triage label, mirroring the triage setup used in the a2ui repo.

Why

Makes PRs that need maintainer attention easy to find. The label is fully owned by the automation and reconciled on every run — added to PRs that match the rule and removed once they no longer do.

Rule

A PR is flagged when it is opened by an external contributor (maintainers manage their own PRs) and is stale: no internal member has responded for more than 1 day after the author's last contribution. Staleness is measured from the last human contribution — a comment, review, inline review comment, or the opening post if there are none — rather than updated_at, so the bot's own label edits never reset the clock.

Changes

  • tool/triage.mjs (new) — the reconciliation logic. Gathers each PR's contributions from three endpoints (issue comments, formal reviews, inline review comments) so a maintainer responding via a review or inline comment counts as an answer. Fetches in bounded concurrent batches, falls back gracefully on per-source errors, and re-reads live labels before mutating to avoid double-labeling from overlapping runs.
  • .github/workflows/triage.yaml (new) — runs the script daily (15:00 UTC) and on the PR events that can change flag state (pull_request_target, issue_comment, pull_request_review, pull_request_review_comment), plus manual dispatch.
  • CONTRIBUTING.md — note that issues are filed against the A2UI project with the component: genui label.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the issue filing instructions in CONTRIBUTING.md and introduces a new PR triage script (scripts/triage.mjs) to automate the reconciliation of the 'status: needs-triage' label. Feedback on the triage script highlights a high-severity issue where PR reviews and inline comments are missed, potentially causing false positives. Additionally, suggestions were made to handle deleted users correctly in the bot check and to optimize the retrieval of the last human contribution using Array.prototype.find() since comments are fetched in descending order.

Comment thread tool/triage.mjs Outdated
Comment thread tool/triage.mjs Outdated
Comment thread tool/triage.mjs Outdated
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Package publishing

If you have publishing permissions, you can use the links below to publish the changes after merging this PR.

Package Version Status Publish tag (post-merge)
package:a2ui_core 0.0.1-wip002 ready to publish a2ui_core-v0.0.1-wip002
package:genai_primitives 0.2.4 ready to publish genai_primitives-v0.2.4
package:genui 0.9.2 (error) pubspec version (0.9.2) and changelog (0.10.0) don't agree
package:genui_a2a 0.9.0 (error) pubspec version (0.9.0) and changelog (0.10.0) don't agree
package:json_schema_builder 0.1.5 already published at pub.dev

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

@polina-c polina-c changed the title Create script that flags PRs for triage, the same was as a2ui. Create script that flags PRs for triage, the same way as a2ui. Jul 2, 2026
@polina-c polina-c changed the title Create script that flags PRs for triage, the same way as a2ui. Create script that flags PRs for triage, the same way as for a2ui. Jul 2, 2026
@polina-c polina-c requested a review from gspencergoog July 2, 2026 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant