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
4 changes: 4 additions & 0 deletions .github/workflows/ai-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ jobs:
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
LLM_REVIEWER_MODEL: "gpt-4o-mini"
LLM_FIXER_MODEL: "gpt-4o"
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
Comment thread
tusharshah21 marked this conversation as resolved.
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
Comment thread
tusharshah21 marked this conversation as resolved.
SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }}
Comment thread
tusharshah21 marked this conversation as resolved.
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
Comment thread
tusharshah21 marked this conversation as resolved.
exclude: "pnpm-lock.yaml,dist/**"
4 changes: 0 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ async function main() {
);
const commitSha: string =
eventData.after || eventData.pull_request?.head?.sha || "";
Comment thread
tusharshah21 marked this conversation as resolved.
const repositoryUrl: string = eventData.repository?.html_url || "";
const commitUrl: string =
repositoryUrl && commitSha ? `${repositoryUrl}/commit/${commitSha}` : "";

const notificationRefs = notifier.isEnabled()
? await notifier.sendStart({
Expand All @@ -150,7 +147,6 @@ async function main() {
prUrl: prDetails.url,
action: eventData.action || "unknown",
Comment thread
tusharshah21 marked this conversation as resolved.
commitSha,
commitUrl,
})
: {};

Expand Down
5 changes: 2 additions & 3 deletions src/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ interface NotificationContext {
prUrl: string;
action: string;
commitSha?: string;
commitUrl?: string;
}

interface NotificationThreadRefs {
Expand Down Expand Up @@ -44,8 +43,8 @@ async function postJson(url: string, payload: Record<string, unknown>, headers?:
}

function buildStartMessage(context: NotificationContext): string {
const commitPart = context.commitSha && context.commitUrl
? `Commit: ${shortenSha(context.commitSha)} (${context.commitUrl})`
const commitPart = context.commitSha
Comment thread
tusharshah21 marked this conversation as resolved.
? `Commit: ${shortenSha(context.commitSha)}`
: "Commit: n/a";

return [
Expand Down
Loading