fix: corrected payload argument
This commit is contained in:
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@@ -2,10 +2,6 @@ name: 'Unit Tests'
|
||||
on:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
issue_comment:
|
||||
types:
|
||||
- created
|
||||
- edited
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
11
dist/index.js
vendored
11
dist/index.js
vendored
@@ -32842,14 +32842,15 @@ const route = core.getInput("route") || "agent-lake";
|
||||
const method = core.getInput("method") || "embeddings_insert";
|
||||
const debug = (core.getInput("debug") || "false").toLowerCase() === "true";
|
||||
|
||||
const payload = github.context.payload;
|
||||
const githubToken = process.env.GITHUB_TOKEN;
|
||||
const commentBody = payload?.comment?.body || "";
|
||||
const issueNumber = payload?.issue?.number;
|
||||
const repoFull = process.env.GITHUB_REPOSITORY;
|
||||
const issueNumber = payload?.issue?.number || 1;
|
||||
const repoFullName = process.env.GITHUB_REPOSITORY;
|
||||
|
||||
const [owner, repo] = repoFull.split("/");
|
||||
const segment_id = internal.examples.code;
|
||||
const document_id = [owner, repo, issueNumber].join(".");
|
||||
const [owner, repo] = repoFullName.split("/");
|
||||
const segment_id = "internal.examples.code";
|
||||
const document_id = [owner, repo, String(issueNumber)].join(".");
|
||||
|
||||
const serverUrl = (
|
||||
process.env.GITHUB_SERVER_URL ||
|
||||
|
||||
7
index.js
7
index.js
@@ -10,13 +10,14 @@ const route = core.getInput("route") || "agent-lake";
|
||||
const method = core.getInput("method") || "embeddings_insert";
|
||||
const debug = (core.getInput("debug") || "false").toLowerCase() === "true";
|
||||
|
||||
const payload = github.context.payload;
|
||||
const githubToken = process.env.GITHUB_TOKEN;
|
||||
const commentBody = payload?.comment?.body || "";
|
||||
const issueNumber = payload?.issue?.number || 1;
|
||||
const repoFull = process.env.GITHUB_REPOSITORY;
|
||||
const repoFullName = process.env.GITHUB_REPOSITORY;
|
||||
|
||||
const [owner, repo] = repoFull.split("/");
|
||||
const segment_id = internal.examples.code;
|
||||
const [owner, repo] = repoFullName.split("/");
|
||||
const segment_id = "internal.examples.code";
|
||||
const document_id = [owner, repo, String(issueNumber)].join(".");
|
||||
|
||||
const serverUrl = (
|
||||
|
||||
Reference in New Issue
Block a user