Skip to content

Commit 47c3f47

Browse files
committed
chore: update templates
1 parent b24918e commit 47c3f47

3 files changed

Lines changed: 81 additions & 27 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,31 +33,25 @@ body:
3333
id: reproduction
3434
attributes:
3535
label: How can it be reproduced?
36-
description: Include a minimal example, steps, or sample code if relevant.
36+
description: Optional. Share steps, a minimal example, or sample code if you have it.
3737
placeholder: |
3838
1. Open...
3939
2. Run...
4040
3. See...
4141
validations:
42-
required: true
42+
required: false
4343
- type: textarea
44-
id: environment
44+
id: additional_info
4545
attributes:
46-
label: Environment
47-
description: Share versions and setup details that might matter.
46+
label: Additional info
47+
description: Optional. Share environment details, logs, errors, or screenshots that help explain the issue.
4848
placeholder: |
4949
VSCode version:
5050
Extension version:
5151
GLuaLS version:
5252
OS:
5353
Project structure/details:
54-
validations:
55-
required: true
56-
- type: textarea
57-
id: logs
58-
attributes:
59-
label: Logs or screenshots
60-
description: Paste any relevant logs, errors, or screenshots.
61-
render: shell
54+
Logs:
55+
Screenshots:
6256
validations:
6357
required: false

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ name: Feature request
22
description: Suggest an improvement for the language server or VSCode extension.
33
title: "[Suggestion]: "
44
labels:
5-
- suggestion
5+
- enhancement
66
body:
77
- type: markdown
88
attributes:
99
value: |
1010
Thanks for the suggestion. Use this form for ideas affecting either the language server or the VSCode extension.
11+
You can keep it brief: describe the current issue, what you want to change, and anything that helps explain the idea.
1112
- type: dropdown
1213
id: area
1314
attributes:
@@ -22,25 +23,17 @@ body:
2223
validations:
2324
required: true
2425
- type: textarea
25-
id: problem
26+
id: idea
2627
attributes:
27-
label: What problem are you trying to solve?
28-
description: Describe the current pain point or limitation.
29-
placeholder: It is difficult to...
30-
validations:
31-
required: true
32-
- type: textarea
33-
id: proposal
34-
attributes:
35-
label: What would you like to happen?
36-
description: Keep it simple and concrete.
37-
placeholder: I would like...
28+
label: What would you like to suggest?
29+
description: Describe the current issue, limitation, or improvement you want to see.
30+
placeholder: It would help if...
3831
validations:
3932
required: true
4033
- type: textarea
4134
id: context
4235
attributes:
4336
label: Extra context
44-
description: Examples, mockups, related tools, or anything else helpful.
37+
description: Optional. Add examples, mockups, related tools, or anything else helpful.
4538
validations:
4639
required: false

.github/workflows/label-issues.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Label issue areas
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
- edited
8+
- reopened
9+
10+
permissions:
11+
issues: write
12+
13+
jobs:
14+
label-area:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Apply area label
18+
uses: actions/github-script@v7
19+
with:
20+
script: |
21+
const body = context.payload.issue.body ?? '';
22+
const match = body.match(/### Area[\s\S]*?\n\n([^\n]+)/);
23+
if (!match) {
24+
core.info('No area field found.');
25+
return;
26+
}
27+
28+
const area = match[1].trim();
29+
const areaLabels = new Map([
30+
['VSCode extension', 'vscode'],
31+
['Language server', 'language-server'],
32+
['Debugger', 'debugger'],
33+
['Documentation', 'documentation'],
34+
['Other', 'other'],
35+
]);
36+
37+
const desiredLabel = areaLabels.get(area);
38+
if (!desiredLabel) {
39+
core.info(`No label mapping for area: ${area}`);
40+
return;
41+
}
42+
43+
const knownAreaLabels = [...areaLabels.values()];
44+
const existingLabels = await github.paginate(github.rest.issues.listLabelsOnIssue, {
45+
owner: context.repo.owner,
46+
repo: context.repo.repo,
47+
issue_number: context.issue.number,
48+
per_page: 100,
49+
});
50+
51+
for (const label of existingLabels) {
52+
if (knownAreaLabels.includes(label.name) && label.name !== desiredLabel) {
53+
await github.rest.issues.removeLabel({
54+
owner: context.repo.owner,
55+
repo: context.repo.repo,
56+
issue_number: context.issue.number,
57+
name: label.name,
58+
});
59+
}
60+
}
61+
62+
await github.rest.issues.addLabels({
63+
owner: context.repo.owner,
64+
repo: context.repo.repo,
65+
issue_number: context.issue.number,
66+
labels: [desiredLabel],
67+
});

0 commit comments

Comments
 (0)