mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Streamline issue submission with YAML forms (#1608)
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user