Streamline issue submission with YAML forms (#1608)

This commit is contained in:
Jerop Kipruto 2025-06-25 18:50:24 -04:00 committed by GitHub
parent 79c647d486
commit b6b9923dc3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 94 additions and 54 deletions

View File

@ -1,21 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
<!-- Please search https://github.com/google-gemini/gemini-cli/issues to see if an issue already exists for the bug you encountered. If you find one, please add a comment to the existing issue. -->
**Describe the bug**
A clear and concise description of what the bug is.
**Client information**
Please paste the full text from the /about command run from Gemini CLI. Also include which platform (MacOS, Windows, Linux).
**Login information**
Describe how you are logging in.
**Additional context**
Add any other context about the problem here.

52
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@ -0,0 +1,52 @@
name: Bug Report
description: Report a bug to help us improve Gemini CLI
labels: ['kind/bug', 'status/need-triage']
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Please search [existing issues](https://github.com/google-gemini/gemini-cli/issues) to see if an issue already exists for the bug you encountered.
- type: textarea
id: problem
attributes:
label: What happened?
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: expected
attributes:
label: What did you expect to happen?
validations:
required: true
- type: textarea
id: info
attributes:
label: Client information
description: Please paste the full text from the `/about` command run from Gemini CLI. Also include which platform (MacOS, Windows, Linux).
value: |
<details>
```console
$ gemini /about
# paste output here
```
</details>
validations:
required: true
- type: textarea
id: login-info
attributes:
label: Login information
description: Describe how you are logging in (e.g., Google Account, API key).
- type: textarea
id: additional-context
attributes:
label: Anything else we need to know?
description: Add any other context about the problem here.

View File

@ -0,0 +1,30 @@
name: Feature Request
description: Suggest an idea for this project
labels: ['kind/enhancement', 'status/need-triage']
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to suggest an enhancement! Please search [existing issues](https://github.com/google-gemini/gemini-cli/issues) to see if a similar feature has already been requested.
- type: textarea
id: feature
attributes:
label: What would you like to be added?
description: A clear and concise description of the enhancement.
validations:
required: true
- type: textarea
id: rationale
attributes:
label: Why is this needed?
description: A clear and concise description of why this enhancement is needed.
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.

View File

@ -42,13 +42,13 @@ In addition to a project settings file, a project's `.gemini` directory can cont
- **`bugCommand`** (object):
- **Description:** Overrides the default URL for the `/bug` command.
- **Default:** `"urlTemplate": "https://github.com/google-gemini/gemini-cli/issues/new?template=bug_report.md&title={title}&body={body}"`
- **Default:** `"urlTemplate": "https://github.com/google-gemini/gemini-cli/issues/new?template=bug_report.yml&title={title}&info={info}"`
- **Properties:**
- **`urlTemplate`** (string): A URL that can contain `{title}` and `{body}` placeholders.
- **`urlTemplate`** (string): A URL that can contain `{title}` and `{info}` placeholders.
- **Example:**
```json
"bugCommand": {
"urlTemplate": "https://bug.example.com/new?title={title}&body={body}"
"urlTemplate": "https://bug.example.com/new?title={title}&info={info}"
}
```

View File

@ -417,14 +417,7 @@ describe('useSlashCommandProcessor', () => {
// Use the mocked memoryUsage value
const memoryUsage = '11.8 MB';
const diagnosticInfo = `
## Describe the bug
A clear and concise description of what the bug is.
## Additional context
Add any other context about the problem here.
## Diagnostic Information
const info = `
* **CLI Version:** ${cliVersion}
* **Git Commit:** ${GIT_COMMIT_INFO}
* **Operating System:** ${osVersion}
@ -433,11 +426,11 @@ Add any other context about the problem here.
* **Memory Usage:** ${memoryUsage}
`;
let url =
'https://github.com/google-gemini/gemini-cli/issues/new?template=bug_report.md';
'https://github.com/google-gemini/gemini-cli/issues/new?template=bug_report.yml';
if (description) {
url += `&title=${encodeURIComponent(description)}`;
}
url += `&body=${encodeURIComponent(diagnosticInfo)}`;
url += `&info=${encodeURIComponent(info)}`;
return url;
};
@ -469,7 +462,7 @@ Add any other context about the problem here.
process.env.SEATBELT_PROFILE = 'permissive-open';
const bugCommand = {
urlTemplate:
'https://custom-bug-tracker.com/new?title={title}&body={body}',
'https://custom-bug-tracker.com/new?title={title}&info={info}',
};
mockConfig = {
...mockConfig,
@ -479,14 +472,7 @@ Add any other context about the problem here.
const { handleSlashCommand } = getProcessor();
const bugDescription = 'This is a custom bug';
const diagnosticInfo = `
## Describe the bug
A clear and concise description of what the bug is.
## Additional context
Add any other context about the problem here.
## Diagnostic Information
const info = `
* **CLI Version:** 0.1.0
* **Git Commit:** ${GIT_COMMIT_INFO}
* **Operating System:** test-platform test-node-version
@ -496,7 +482,7 @@ Add any other context about the problem here.
`;
const expectedUrl = bugCommand.urlTemplate
.replace('{title}', encodeURIComponent(bugDescription))
.replace('{body}', encodeURIComponent(diagnosticInfo));
.replace('{info}', encodeURIComponent(info));
let commandResult: SlashCommandActionReturn | boolean = false;
await act(async () => {

View File

@ -621,14 +621,7 @@ export const useSlashCommandProcessor = (
const cliVersion = await getCliVersion();
const memoryUsage = formatMemoryUsage(process.memoryUsage().rss);
const diagnosticInfo = `
## Describe the bug
A clear and concise description of what the bug is.
## Additional context
Add any other context about the problem here.
## Diagnostic Information
const info = `
* **CLI Version:** ${cliVersion}
* **Git Commit:** ${GIT_COMMIT_INFO}
* **Operating System:** ${osVersion}
@ -638,14 +631,14 @@ Add any other context about the problem here.
`;
let bugReportUrl =
'https://github.com/google-gemini/gemini-cli/issues/new?template=bug_report.md&title={title}&body={body}';
'https://github.com/google-gemini/gemini-cli/issues/new?template=bug_report.yml&title={title}&info={info}';
const bugCommand = config?.getBugCommand();
if (bugCommand?.urlTemplate) {
bugReportUrl = bugCommand.urlTemplate;
}
bugReportUrl = bugReportUrl
.replace('{title}', encodeURIComponent(bugDescription))
.replace('{body}', encodeURIComponent(diagnosticInfo));
.replace('{info}', encodeURIComponent(info));
addMessage({
type: MessageType.INFO,