Streamline issue submission with YAML forms (#1608)
This commit is contained in:
parent
79c647d486
commit
b6b9923dc3
|
@ -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.
|
|
|
@ -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.
|
|
@ -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.
|
|
@ -42,13 +42,13 @@ In addition to a project settings file, a project's `.gemini` directory can cont
|
||||||
- **`bugCommand`** (object):
|
- **`bugCommand`** (object):
|
||||||
|
|
||||||
- **Description:** Overrides the default URL for the `/bug` command.
|
- **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:**
|
- **Properties:**
|
||||||
- **`urlTemplate`** (string): A URL that can contain `{title}` and `{body}` placeholders.
|
- **`urlTemplate`** (string): A URL that can contain `{title}` and `{info}` placeholders.
|
||||||
- **Example:**
|
- **Example:**
|
||||||
```json
|
```json
|
||||||
"bugCommand": {
|
"bugCommand": {
|
||||||
"urlTemplate": "https://bug.example.com/new?title={title}&body={body}"
|
"urlTemplate": "https://bug.example.com/new?title={title}&info={info}"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -417,14 +417,7 @@ describe('useSlashCommandProcessor', () => {
|
||||||
// Use the mocked memoryUsage value
|
// Use the mocked memoryUsage value
|
||||||
const memoryUsage = '11.8 MB';
|
const memoryUsage = '11.8 MB';
|
||||||
|
|
||||||
const diagnosticInfo = `
|
const info = `
|
||||||
## 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
|
|
||||||
* **CLI Version:** ${cliVersion}
|
* **CLI Version:** ${cliVersion}
|
||||||
* **Git Commit:** ${GIT_COMMIT_INFO}
|
* **Git Commit:** ${GIT_COMMIT_INFO}
|
||||||
* **Operating System:** ${osVersion}
|
* **Operating System:** ${osVersion}
|
||||||
|
@ -433,11 +426,11 @@ Add any other context about the problem here.
|
||||||
* **Memory Usage:** ${memoryUsage}
|
* **Memory Usage:** ${memoryUsage}
|
||||||
`;
|
`;
|
||||||
let url =
|
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) {
|
if (description) {
|
||||||
url += `&title=${encodeURIComponent(description)}`;
|
url += `&title=${encodeURIComponent(description)}`;
|
||||||
}
|
}
|
||||||
url += `&body=${encodeURIComponent(diagnosticInfo)}`;
|
url += `&info=${encodeURIComponent(info)}`;
|
||||||
return url;
|
return url;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -469,7 +462,7 @@ Add any other context about the problem here.
|
||||||
process.env.SEATBELT_PROFILE = 'permissive-open';
|
process.env.SEATBELT_PROFILE = 'permissive-open';
|
||||||
const bugCommand = {
|
const bugCommand = {
|
||||||
urlTemplate:
|
urlTemplate:
|
||||||
'https://custom-bug-tracker.com/new?title={title}&body={body}',
|
'https://custom-bug-tracker.com/new?title={title}&info={info}',
|
||||||
};
|
};
|
||||||
mockConfig = {
|
mockConfig = {
|
||||||
...mockConfig,
|
...mockConfig,
|
||||||
|
@ -479,14 +472,7 @@ Add any other context about the problem here.
|
||||||
|
|
||||||
const { handleSlashCommand } = getProcessor();
|
const { handleSlashCommand } = getProcessor();
|
||||||
const bugDescription = 'This is a custom bug';
|
const bugDescription = 'This is a custom bug';
|
||||||
const diagnosticInfo = `
|
const info = `
|
||||||
## 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
|
|
||||||
* **CLI Version:** 0.1.0
|
* **CLI Version:** 0.1.0
|
||||||
* **Git Commit:** ${GIT_COMMIT_INFO}
|
* **Git Commit:** ${GIT_COMMIT_INFO}
|
||||||
* **Operating System:** test-platform test-node-version
|
* **Operating System:** test-platform test-node-version
|
||||||
|
@ -496,7 +482,7 @@ Add any other context about the problem here.
|
||||||
`;
|
`;
|
||||||
const expectedUrl = bugCommand.urlTemplate
|
const expectedUrl = bugCommand.urlTemplate
|
||||||
.replace('{title}', encodeURIComponent(bugDescription))
|
.replace('{title}', encodeURIComponent(bugDescription))
|
||||||
.replace('{body}', encodeURIComponent(diagnosticInfo));
|
.replace('{info}', encodeURIComponent(info));
|
||||||
|
|
||||||
let commandResult: SlashCommandActionReturn | boolean = false;
|
let commandResult: SlashCommandActionReturn | boolean = false;
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
|
|
|
@ -621,14 +621,7 @@ export const useSlashCommandProcessor = (
|
||||||
const cliVersion = await getCliVersion();
|
const cliVersion = await getCliVersion();
|
||||||
const memoryUsage = formatMemoryUsage(process.memoryUsage().rss);
|
const memoryUsage = formatMemoryUsage(process.memoryUsage().rss);
|
||||||
|
|
||||||
const diagnosticInfo = `
|
const info = `
|
||||||
## 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
|
|
||||||
* **CLI Version:** ${cliVersion}
|
* **CLI Version:** ${cliVersion}
|
||||||
* **Git Commit:** ${GIT_COMMIT_INFO}
|
* **Git Commit:** ${GIT_COMMIT_INFO}
|
||||||
* **Operating System:** ${osVersion}
|
* **Operating System:** ${osVersion}
|
||||||
|
@ -638,14 +631,14 @@ Add any other context about the problem here.
|
||||||
`;
|
`;
|
||||||
|
|
||||||
let bugReportUrl =
|
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();
|
const bugCommand = config?.getBugCommand();
|
||||||
if (bugCommand?.urlTemplate) {
|
if (bugCommand?.urlTemplate) {
|
||||||
bugReportUrl = bugCommand.urlTemplate;
|
bugReportUrl = bugCommand.urlTemplate;
|
||||||
}
|
}
|
||||||
bugReportUrl = bugReportUrl
|
bugReportUrl = bugReportUrl
|
||||||
.replace('{title}', encodeURIComponent(bugDescription))
|
.replace('{title}', encodeURIComponent(bugDescription))
|
||||||
.replace('{body}', encodeURIComponent(diagnosticInfo));
|
.replace('{info}', encodeURIComponent(info));
|
||||||
|
|
||||||
addMessage({
|
addMessage({
|
||||||
type: MessageType.INFO,
|
type: MessageType.INFO,
|
||||||
|
|
Loading…
Reference in New Issue