Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion scripts/lint-automation/github-issue-creator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class GitHubIssueCreator {
// Only update if the count has changed (indicating new violations or fixes)
if (newCount !== currentCount) {
const updatedTitle = `πŸ”§ Fix ${ruleId} violations (${newCount} instances)`;
const updatedBody = `${newGroup.body}\n\n---\n\n**πŸ”„ Issue Updated:** ${new Date().toISOString()}\n**Previous Count:** ${currentCount} instances\n**Current Count:** ${newCount} instances`;
const updatedBody = this.generateUpdatedIssueBody(newGroup.body, currentCount, newCount);

const response = await fetch(`${this.apiBase}/repos/${this.owner}/${this.repo}/issues/${existingIssue.number}`, {
method: 'PATCH',
Expand Down Expand Up @@ -769,6 +769,10 @@ function processData(data: unknown) {

`;
}

private generateUpdatedIssueBody(newGroupBody: string, currentCount: number, newCount: number): string {
return `${newGroupBody}\n\n---\n\n**πŸ”„ Issue Updated:** ${new Date().toISOString()}\n**Previous Count:** ${currentCount} instances\n**Current Count:** ${newCount} instances`;
}
}

// Main execution function
Expand Down