mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-02-01 22:48:03 +00:00
feat(cli): replace --since with --until for 'older than' filtering in /oncall audit
This commit is contained in:
@@ -62,14 +62,14 @@ export const oncallCommand: SlashCommand = {
|
||||
}
|
||||
|
||||
let limit = 100;
|
||||
let since: string | undefined;
|
||||
let until: string | undefined;
|
||||
|
||||
if (args && args.trim().length > 0) {
|
||||
const argArray = args.trim().split(/\s+/);
|
||||
for (let i = 0; i < argArray.length; i++) {
|
||||
const arg = argArray[i];
|
||||
if (arg === '--since' && i + 1 < argArray.length) {
|
||||
since = argArray[i + 1];
|
||||
if (arg === '--until' && i + 1 < argArray.length) {
|
||||
until = argArray[i + 1];
|
||||
i++;
|
||||
} else {
|
||||
const parsedLimit = parseInt(arg, 10);
|
||||
@@ -86,7 +86,7 @@ export const oncallCommand: SlashCommand = {
|
||||
<TriageIssues
|
||||
config={config}
|
||||
initialLimit={limit}
|
||||
since={since}
|
||||
until={until}
|
||||
onExit={() => context.ui.removeComponent()}
|
||||
/>
|
||||
),
|
||||
|
||||
@@ -62,12 +62,12 @@ export const TriageIssues = ({
|
||||
config,
|
||||
onExit,
|
||||
initialLimit = 100,
|
||||
since,
|
||||
until,
|
||||
}: {
|
||||
config: Config;
|
||||
onExit: () => void;
|
||||
initialLimit?: number;
|
||||
since?: string;
|
||||
until?: string;
|
||||
}) => {
|
||||
const [state, setState] = useState<TriageState>({
|
||||
status: 'loading',
|
||||
@@ -115,8 +115,8 @@ export const TriageIssues = ({
|
||||
'-type:Task,Workstream,Feature,Epic',
|
||||
'-label:workstream-rollup',
|
||||
];
|
||||
if (since) {
|
||||
searchParts.push(`created:>=${since}`);
|
||||
if (until) {
|
||||
searchParts.push(`created:<=${until}`);
|
||||
}
|
||||
|
||||
const { stdout } = await spawnAsync('gh', [
|
||||
@@ -152,7 +152,7 @@ export const TriageIssues = ({
|
||||
}));
|
||||
}
|
||||
},
|
||||
[since],
|
||||
[until],
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user