Skip to content

ADR: pinned prerelease versioning for beta release lines #160

ADR: pinned prerelease versioning for beta release lines

ADR: pinned prerelease versioning for beta release lines #160

Workflow file for this run

name: Issue triage
on:
issues:
types: [opened]
workflow_dispatch:
inputs:
issue_number:
description: 'Issue number to triage (for manual testing)'
required: true
type: string
jobs:
triage:
if: github.event_name == 'workflow_dispatch' || github.event.sender.type != 'Bot'
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
issues: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
fetch-depth: 1
- name: Triage with Claude
uses: anthropics/claude-code-action@v1
env:
GH_TOKEN: ${{ github.token }}
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
prompt: |
You are triaging a newly opened issue in the Equinor Design System (EDS) repository.
Repository: ${{ github.repository }}
Issue number: ${{ github.event.issue.number || inputs.issue_number }}
Start by reading the issue:
gh issue view ${{ github.event.issue.number || inputs.issue_number }}
Do TWO things, in order.
=== 1. Compliance check ===
First, check if the issue has any assignees. If it does, skip this entire section — the stale workflow exempts assigned issues from auto-close, so labeling "issue needs work" would be misleading. Proceed directly to step 2.
If there are no assignees, continue:
The repo uses issue templates (bug, feature request, generic). Each template has placeholder prompts like:
"A clear and concise description of what the bug is."
"Steps to reproduce the bug: 1. 2. 3. 4."
"Describe the solution you'd like"
"In order to <achieve some value>, as a <type of user>, I want <some functionality>." (default generic title)
"A clear and concise description of the main goal" (generic: General objective)
"(A list of) actionable goals that leads to fulfilling the general objective" (generic: Specific objectives)
"The definition of done" (generic: Outcome)
Treat the issue as INCOMPLETE if any of the following are true:
- Placeholder text is left unchanged
- Required sections are empty
- The content is too vague or trivial to act on (e.g. only a title with no body, or body is "it doesn't work")
If INCOMPLETE:
a. Add the "issue needs work" label (note: the label name contains spaces, quote it):
gh issue edit ${{ github.event.issue.number || inputs.issue_number }} --add-label "issue needs work"
b. Post a single comment (gh issue comment) that:
- Politely thanks the author for opening the issue
- Lists specifically what information is missing
- Notes that the issue will be closed automatically after 3 days if not updated
- Invites the author to edit the issue or add a comment with the missing details
If COMPLETE: skip this part entirely. Do nothing.
=== 2. Similarity search ===
Search for related issues in BOTH open and closed state — a closed issue may contain the resolution.
Derive 2-4 keyword searches from the issue title and body, then run them:
gh search issues --repo ${{ github.repository }} --state all --limit 20 <keywords>
You may also use:
gh issue list --repo ${{ github.repository }} --state all --search "<keywords>" --limit 20
Exclude the current issue (#${{ github.event.issue.number || inputs.issue_number }}) from results.
Apply a HIGH threshold for "related": the issue must clearly overlap in symptom, component, or feature — not just share a common word. Prefer quality over quantity. If unsure, do not comment.
If you find 1-5 strong matches, post a SINGLE comment that:
- Starts with a brief sentence explaining these may be related
- Lists each match as: "- #NUMBER — TITLE (open/closed): one-sentence reason it's relevant"
- For closed matches with a resolution, call it out explicitly (e.g. "closed as fixed in #XYZ")
- Ends with this disclaimer (exact text):
_This comment was generated by an LLM and may be inaccurate. Please verify that the linked issues are actually relevant._
If there are no strong matches: do not post a comment.
=== Constraints ===
- Do not modify any files in the repository.
- Do not open pull requests.
- Post at most one compliance comment and at most one similarity comment.
- Keep comments concise and friendly.
claude_args: >-
--allowed-tools
"Bash(gh issue view:*),Bash(gh issue list:*),Bash(gh issue edit:*),Bash(gh issue comment:*),Bash(gh search issues:*)"