Skip to content

Add team-triggered triage summaries to the Gemini issue triage workflow - #3

Open
divyashreepathihalli wants to merge 1 commit into
keras-team:mainfrom
divyashreepathihalli:main
Open

Add team-triggered triage summaries to the Gemini issue triage workflow#3
divyashreepathihalli wants to merge 1 commit into
keras-team:mainfrom
divyashreepathihalli:main

Conversation

@divyashreepathihalli

@divyashreepathihalli divyashreepathihalli commented Aug 28, 2026

Copy link
Copy Markdown

The reusable Gemini issue triage workflow now has two modes, chosen automatically from the caller's event:

  1. Label-only (default) — on issues events, allowlisted labels are applied. No comment is posted.
  2. Triage summary — when a team member comments /issue triage, labels are applied and a summary comment is posted from a fixed template.

Team member check
A commenter is authorized if their author_association is in allowed_associations (default OWNER,MEMBER,COLLABORATOR), or optionally if they belong to the org team named by triage_team (requires the new optional ORG_READ_TOKEN secret with read:org).

Add comment template
The comments will follow strict template for the response

Prompt-injection hardening
Every field except summary is a closed enum mapped through a lookup table; unknown values (including proto/constructor) fall back to fixed strings.
summary is redacted for credentials, stripped of backticks/angle brackets/control characters, collapsed to one line, capped at 600 chars, and rendered inside a ```text fence — so it can't break out, add links/HTML/images, or ping @mentions.
Related file paths come from the deterministic git grep step, regex-filtered; the trigger login is regex-validated.
Issue text and code snippets are wrapped in tagged blocks with an explicit untrusted-data instruction in the prompt.

Secret redaction
redactSecrets() masks Google/GitHub/AWS/sk-/Slack/Hugging Face tokens, Bearer headers, key=/password= assignments, emails, PEM private-key blocks, and long mixed alphanumeric blobs. It runs on the issue title/body and code snippets before they're sent to Gemini, and on the model summary before it's posted.

@divyashreepathihalli
divyashreepathihalli requested review from a team and jeffcarp as code owners August 28, 2026 21:39
// Patterns for credentials that must never be echoed into a comment (or sent
// on to the model). Order matters: multi-line and specific patterns first, the
// generic high-entropy catch-all last.
const SECRET_PATTERNS = [

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think this is enough to protect against leaking data - I don't think we should move forward with this. Will add more review comments later.

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.

2 participants