Skip to content

ci: ai issue triage + consolidated pr labeler & stale bot#70

Merged
duzos merged 7 commits into
mainfrom
ci/automation
Jun 5, 2026
Merged

ci: ai issue triage + consolidated pr labeler & stale bot#70
duzos merged 7 commits into
mainfrom
ci/automation

Conversation

@duzos

@duzos duzos commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

automated issue/PR triage, modelled on AIT's labeler suite but consolidated and AI-assisted.

what's here

.github/workflows/issue-triage.yml - AI triage (the new bit)
on a new issue, GitHub Models (actions/ai-inference, free built-in LLM) classifies it against our label taxonomy and:

  • applies the matching T: / P: / D: / A: / C: labels (only ones that actually exist in the repo)
  • sets the GitHub issue type (Bug/Feature/Task) - best effort
  • sets the org Priority + Effort fields - best effort
  • leaves a short triage comment with its reasoning
  • falls back to S: Untriaged if the model output can't be parsed
  • also runnable manually via workflow_dispatch with an issue number

.github/workflows/pr-labeler.yml - path-based area labels (actions/labeler + .github/labeler.yml) + size labels (XS-XL), one file instead of AIT's seven.

.github/workflows/stale.yml - marks quiet issues/PRs S: Stale after 30d, closes after 7 more. Exempts P0/P1/S: Frozen/Issue: Intended Feature/S: Help Wanted.

.github/labeler.yml - path -> area/change label map for this repo's dev.amble.lib layout.

before it fully works

  • merge to the default branch - issues: and schedule: triggers only fire from the default branch.
  • GitHub Models must be enabled for the org/repo (Settings -> Models). If not, only the labeler/size/stale jobs run.
  • issue type + Priority/Effort fields are org-level; the default GITHUB_TOKEN may not have perms, hence best-effort (|| true). If you want them guaranteed, swap in a PAT/app token with org access as a secret and set GH_TOKEN to it in the triage job.
  • no Copilot auto-assignment wired in (per the chosen scope) - easy to add later as an extra step if wanted.

Copilot AI 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.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds automated issue/PR triage tooling in GitHub Actions: AI-assisted issue classification, consolidated PR labeling, and a stale bot for inactive items.

Changes:

  • Introduces an AI issue triage workflow that classifies issues and applies repo/org metadata best-effort.
  • Adds a consolidated PR labeler workflow (path-based + size labels) and corresponding labeler config.
  • Adds a stale workflow to mark and close inactive issues/PRs with exemptions for high-priority/frozen items.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.

File Description
.github/workflows/issue-triage.yml New AI-assisted issue triage workflow using GitHub Models + gh/jq to apply labels/fields and comment.
.github/workflows/pr-labeler.yml New consolidated PR labeling workflow (path labeler + size labels).
.github/workflows/stale.yml New stale bot workflow to mark/close inactive issues/PRs with exemptions.
.github/labeler.yml New path-to-label mapping used by actions/labeler for repo-specific areas/changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/labeler.yml Outdated
Comment thread .github/labeler.yml Outdated
Comment thread .github/labeler.yml Outdated
Comment thread .github/workflows/issue-triage.yml Outdated
Comment thread .github/workflows/issue-triage.yml Outdated
Comment thread .github/workflows/issue-triage.yml Outdated
Comment thread .github/workflows/stale.yml
Comment thread .github/workflows/stale.yml
Comment thread .github/workflows/issue-triage.yml

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread .github/labeler.yml
Comment thread .github/workflows/issue-triage.yml
Comment thread .github/workflows/pr-labeler.yml

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

Comment thread .github/workflows/issue-triage.yml
Comment thread .github/workflows/issue-triage.yml Outdated
Comment thread .github/workflows/issue-triage.yml Outdated
Comment thread .github/workflows/issue-triage.yml

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/issue-triage.yml

Copilot AI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@duzos

duzos commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

copilots round 5 review ran but couldnt post its comments (github-mcp-server: Azure AI Agent request failed), so noting them here - both were valid and are fixed in 9a1d28d:

  1. max-completion-tokens isnt a real actions/ai-inference input (it's max-tokens) - the cap was being silently ignored. fixed.
  2. summary is model output and could contain newlines that break the comment table - now normalized to one line + capped at 200 chars.

verified the input name against the action.yml at the pinned sha.

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/issue-triage.yml
@duzos duzos added A: Build Area: Gradle, Maven publishing, and dependency consumption. C: No Java Changes: Requires no Java knowledge to review or fix this item. size/M Denotes a PR that changes 100-999 lines. T: New Feature Type: New feature or content, or extending existing content. labels Jun 5, 2026

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment on lines +125 to +129
if [ -z "$JSON" ] || ! printf '%s' "$JSON" | jq -e . >/dev/null 2>&1; then
echo "no valid json -> S: Untriaged"
gh issue edit "$NUM" --repo "$REPO" --add-label "S: Untriaged" || true
exit 0
fi
Comment on lines +139 to +140
SUMMARY=$(echo "$JSON" | jq -r '.summary // empty' | tr '\r\n' ' ' | cut -c1-200)
NEEDS=$(echo "$JSON" | jq -r '.needs_info // false')
uses: actions/ai-inference@b81b2afb8390ee6839b494a404766bef6493c7d9 # v1
with:
model: openai/gpt-4o-mini
max-tokens: 500
@duzos duzos merged commit 96f2f05 into main Jun 5, 2026
2 checks passed
@duzos duzos deleted the ci/automation branch June 5, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A: Build Area: Gradle, Maven publishing, and dependency consumption. C: No Java Changes: Requires no Java knowledge to review or fix this item. size/M Denotes a PR that changes 100-999 lines. T: New Feature Type: New feature or content, or extending existing content.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants