feat(cli): replace --since with --until for 'older than' filtering in /oncall audit

This commit is contained in:
Sehoon Shon
2026-01-28 02:27:02 -05:00
parent e048e678b9
commit 9287a3dc63
2 changed files with 9 additions and 9 deletions

View File

@@ -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()}
/>
),

View File

@@ -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(() => {