Skip to content

feat(issue-labeler): set native issue type and language field on issues#72

Open
yonib05 wants to merge 10 commits into
strands-agents:mainfrom
yonib05:issue-labeler-native-type-field
Open

feat(issue-labeler): set native issue type and language field on issues#72
yonib05 wants to merge 10 commits into
strands-agents:mainfrom
yonib05:issue-labeler-native-type-field

Conversation

@yonib05

@yonib05 yonib05 commented Jun 26, 2026

Copy link
Copy Markdown
Member

What

Extends the issue-labeler action so that, for issues only, it also sets the org's native issue Type and the Language issue field, mapped from the labels it already classifies. This is purely additive: the existing label classification and application are unchanged.

These features do not apply to pull requests, so the new behavior self-gates on github.event_name == 'issues'.

How

  • Config (back-compatible): a label may declare a type: (maps to a native issue type), and a config may declare a top-level field: block with per-label option: keys (maps to a single-select issue field). Existing string/description config forms keep working untouched.
  • Runtime ID resolution: human-readable names (Bug, Language, Python) are resolved to GraphQL node IDs via a repo-level query, matched case-insensitively. No org IDs are hardcoded.
  • Mutations: updateIssueIssueType and setIssueFieldValue. Existing values are overwritten.
  • Strictly non-fatal: the whole native block is best-effort. Any failure (missing gh, malformed field config, API/permission error) is downgraded to a ::warning:: and the workflow stays green. Labels are applied before this block runs.
  • Backfill: backfill.py applies the same logic to existing issues (all states), reusing existing labels where present and only calling the LLM for issues missing one. Supports --dry-run.

Security model

Unchanged. The LLM still has no tools and its output is constrained to the enum allowlist. The new code acts only on those allowlisted labels routed through static, operator-authored config; it never receives free-form LLM text. Worst case remains mislabeling.

Testing

  • 21 unit tests pass (pytest test_classify.py test_backfill.py), covering config parsing, ID indexing, label→target mapping, event gating, the non-fatal guard, and the backfill decision logic. GitHub I/O is mocked.
  • Not yet verified at runtime: whether the Actions GITHUB_TOKEN (issues: write) can perform the type/field mutations. The non-fatal guard means a permission gap surfaces as a warning, not a failed run. Will confirm against a live issue and add a PAT fallback if needed.

Follow-up

Consuming-repo config changes (harness-sdk, evals: add design/blog labels, add type:/field: mappings) ship as separate PRs once this merges.

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