Skip to content

Conversation

cs-raj
Copy link
Contributor

@cs-raj cs-raj commented Aug 5, 2025

version bump: 1.14.0 -> 1.15.0

@@ -568,6 +576,11 @@ export abstract class AuditBaseCommand extends BaseCommand<typeof AuditBaseComma
row['Fix status'] = row.fixStatus;
}

// Handle variant flag for entries
if ('is_variant' in issue) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cs-raj , can we add is_variant in constant files or somewhere else? So that we can use the variable in test cases as well.

@@ -1,4 +1,7 @@
import map from 'lodash/map';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cs-raj , try to use import map from 'lodash/map';

Comment on lines +5 to +15
export class VariantLogger implements IVariantLogger {
constructor(private readonly log: LogFn) {}

logError(message: string, args: Record<string, string>): void {
this.log($t(message, args), 'error');
}

logInfo(message: string, args: Record<string, string>): void {
this.log($t(message, args), 'info');
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cs-raj , why have you added separate logger for variant? We can use existing audit log file

private isValidVariantEntry(entry: unknown): entry is VariantEntry {
if (!entry || typeof entry !== 'object') return false;

const e = entry as Record<string, unknown>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cs-raj , instead of e variable can you use meaningful name ?

if (Array.isArray(value)) {
// Check each item in array for references
for (const item of value) {
if (item && typeof item === 'object' && item.uid && item._content_type_uid) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cs-raj , use optional chaining here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants