Skip to content
Merged
Show file tree
Hide file tree
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
66 changes: 0 additions & 66 deletions .github/workflows/gitlin-bot.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .github/workflows/gitlin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
pull_request_review_comment:
types: [created]

# Prevent duplicate runs for the same comment
concurrency:
group: gitlin-${{ github.event.comment.id }}
cancel-in-progress: false

jobs:
create-issues:
# Only run if comment contains the trigger
Expand Down
1 change: 1 addition & 0 deletions final-debug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Final Debug Test
8 changes: 5 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
}
`;

const resolutionData: any = await this.octokit.graphql(query, {

Check warning on line 65 in src/index.ts

View workflow job for this annotation

GitHub Actions / test

Unexpected any. Specify a different type
owner,
repo,
pr: prNumber,
Expand Down Expand Up @@ -108,7 +108,7 @@
}

console.log(
`Collected ${allComments.length} unresolved comments (${issueComments.data.length} issue comments, ${allComments.filter(c => c.type === "review").length} unresolved review comments)`,
`Collected ${allComments.length} unresolved comments (${issueComments.data.length} issue comments, ${allComments.filter((c) => c.type === "review").length} unresolved review comments)`,
);

return allComments;
Expand All @@ -132,7 +132,9 @@
// Check if any issue has our tracking marker
for (const issue of existingIssues) {
if (issue.description?.includes(`<!-- gitlin:pr:${prMarker} -->`)) {
console.log(`PR already processed - found ${existingIssues.length} existing issues`);
console.log(
`PR already processed - found ${existingIssues.length} existing issues`,
);
return true;
}
}
Expand Down Expand Up @@ -181,7 +183,7 @@
comments = allComments;

// Combine all comments with separators
commentBody = comments.map(c => c.body).join("\n\n---\n\n");
commentBody = comments.map((c) => c.body).join("\n\n---\n\n");
console.log(
`Analyzing ${comments.length} comments (${commentBody.length} characters)`,
);
Expand Down
6 changes: 4 additions & 2 deletions src/linear-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ export class LinearClient {

try {
const linearIssue = await this.createIssue(issue, createdIssues, prUrl);
console.log(`[${i + 1}/${issues.length}] ✓ CREATED: ${linearIssue.identifier} - ${linearIssue.url}`);
console.log(
`[${i + 1}/${issues.length}] ✓ CREATED: ${linearIssue.identifier} - ${linearIssue.url}`,
);

result.issues.push({
title: issue.title,
Expand Down Expand Up @@ -147,7 +149,7 @@ export class LinearClient {
description += `\n\n---\n\n**Related PR:** ${prUrl}`;
// Add hidden tracking marker for duplicate detection
// Format: <!-- gitlin:pr:owner/repo/pull/123 -->
description += `\n<!-- gitlin:pr:${prUrl.replace('https://github.com/', '')} -->`;
description += `\n<!-- gitlin:pr:${prUrl.replace("https://github.com/", "")} -->`;
}

// Refresh cache if needed
Expand Down