Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

14 changes: 0 additions & 14 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

81 changes: 81 additions & 0 deletions .github/ISSUE_TEMPLATE/report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Issue Report
description: Report a bug, request a feature, or suggest an enhancement.
title: "[<type>] <short summary>"
labels: []
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to file this issue. Please fill out the fields below —
the **Type** field determines which label gets applied automatically.

**Note:** This template is not meant for security vulnerability disclosures.
Any such issue created here will be removed on sight. Please report vulnerabilities
to the Eclipse Foundation's security team instead — see SECURITY.md in the repository root.

Have a question instead of a bug/feature? Please use
[GitHub Discussions](https://github.com/eclipse-theia/theia/discussions) rather than filing an issue.

- type: dropdown
id: type
attributes:
label: Type
description: What kind of issue is this?
options:
- Bug
- Feature
- Enhancement
validations:
required: true

- type: textarea
id: description
attributes:
label: Description
description: A clear and concise description of the issue.
validations:
required: true

- type: textarea
id: repro
attributes:
label: Steps to Reproduce (bugs only)
description: If this is a bug, list the steps to reproduce the behavior. Leave blank otherwise.
placeholder: |
1. Go to '...'
2. Click on '...'
3. See error
validations:
required: false

- type: textarea
id: expected
attributes:
label: Expected Behavior
description: What did you expect to happen? (For bugs) or what should the feature/enhancement do?
validations:
required: false

- type: input
id: os
attributes:
label: Operating System
description: Which OS are you running, if applicable?
validations:
required: false

- type: input
id: version
attributes:
label: Theia Version
description: Which version of Theia are you using, if applicable?
validations:
required: false

- type: textarea
id: context
attributes:
label: Additional Context
description: Anything else that would help — logs, screenshots, environment details.
validations:
required: false
71 changes: 71 additions & 0 deletions .github/workflows/auto-label-on-intake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Auto-label on intake

# Fires the moment a new issue is opened via the structured issue form.
# Reads the "Type" dropdown answer and applies the matching label —
# removes the "bug" vs "type: bug" vs title-prefix ambiguity from Section 2.3.

on:
issues:
types: [opened]

permissions:
issues: write

jobs:
apply-type-label:
runs-on: ubuntu-latest
steps:
- name: Parse Type field and apply label
uses: actions/github-script@v7
with:
script: |
const body = context.payload.issue.body || "";

// Matches Theia's existing label set (no separate "feature" label exists,
// so Feature and Enhancement both map to "enhancement").
// Keys must exactly match the dropdown options in report.yml.
const typeToLabel = {
"Bug": "bug",
"Feature": "enhancement",
"Enhancement": "enhancement",
"Question": "question",
};

// Issue forms render each field as "### <Label>\n\n<answer>".
// This pulls out whatever follows the "### Type" heading, up to the next heading or end of body.
const match = body.match(/### Type\s*\n+([^\n#]+)/i);

if (!match) {
console.log("Could not find a 'Type' field in the issue body — skipping auto-label. " +
"This issue was likely opened without the structured form.");
return;
}

const selected = match[1].trim();
const label = typeToLabel[selected];

if (!label) {
console.log(`Type value "${selected}" did not match any known option — skipping auto-label.`);
return;
}

try {
await github.rest.issues.getLabel({
owner: context.repo.owner,
repo: context.repo.repo,
name: label,
});
} catch (error) {
console.log(`Label "${label}" does not exist in this repo yet — create it or update the ` +
`typeToLabel map in this workflow to match an existing label. Skipping.`);
return;
}

await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: [label],
});

console.log(`Applied label "${label}" based on Type: "${selected}".`);
Loading