Compare commits

..

1 Commits

Author SHA1 Message Date
3f35b97e15 feat: do not chunk
All checks were successful
Dependabot Auto-Merge / dependabot (pull_request) Has been skipped
Dependabot Auto-Merge / devopsbot (pull_request) Has been skipped
Dependabot Auto-Merge / rennovatebot (pull_request) Has been skipped
COMMIT LINT / commitlint (pull_request) Successful in 24s
Unit Tests / unittest (pull_request) Successful in 1m53s
2026-06-08 14:21:55 +00:00
7 changed files with 41 additions and 12 deletions

View File

@@ -16,7 +16,7 @@ jobs:
- name: Send task to coding agent
uses: https://git.yusufali.ca/actions/embed-markdown@main
with:
api_url: ${{ secrets.AGENT_API_URL }} # default: https://api.servc.io
api_url: ${{ secrets.AGENT_API_URL }} # default: http://agent-api.k8s.private
api_token: ${{ secrets.AGENT_TOKEN }} # optional, required for authenticated API calls
route: agent-lake # default: agent-lake
debug: false
debug: false

View File

@@ -13,8 +13,13 @@ jobs:
steps:
- uses: actions/checkout@v6
- name: Test Local Action
id: test
uses: ./
- uses: actions/setup-node@v4
with:
debug: 'true'
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Run unit tests
run: npm test

View File

@@ -22,9 +22,8 @@ jobs:
- name: Send task to coding agent
uses: https://git.yusufali.ca/actions/embed-markdown@main
with:
api_url: ${{ secrets.AGENT_API_URL }} # default: https://api.servc.io
api_url: ${{ secrets.AGENT_API_URL }} # default: http://agent-api.k8s.private
api_token: ${{ secrets.AGENT_TOKEN }} # optional, required for authenticated API calls
route: agent-lake # default: agent-lake
debug: false
```

View File

@@ -3,7 +3,7 @@ description: 'Sends markdown files to the lake to embed into vector form'
inputs:
api_url:
description: 'api url'
default: 'http://agents-api.servc-agents:3000'
default: 'http://agent-api.k8s.private'
required: false
api_token:
description: 'API token for authentication'

2
dist/index.js vendored
View File

@@ -24,7 +24,7 @@ function getConfig({
env = process.env,
} = {}) {
const apiUrl =
coreModule.getInput("api_url") || "http://agents-api.servc-agents:3000";
coreModule.getInput("api_url") || "http://agent-api.k8s.private";
const apiToken = coreModule.getInput("api_token");
const route = coreModule.getInput("route") || "agent-lake";
const method = coreModule.getInput("method") || "embeddings_insert";

View File

@@ -18,7 +18,7 @@ function getConfig({
env = process.env,
} = {}) {
const apiUrl =
coreModule.getInput("api_url") || "http://agents-api.servc-agents:3000";
coreModule.getInput("api_url") || "http://agent-api.k8s.private";
const apiToken = coreModule.getInput("api_token");
const route = coreModule.getInput("route") || "agent-lake";
const method = coreModule.getInput("method") || "embeddings_insert";

View File

@@ -1,7 +1,32 @@
const test = require("node:test");
const assert = require("node:assert/strict");
const { buildRequestPayload, main, sanitizeDocumentId } = require("./index");
const {
buildRequestPayload,
getConfig,
main,
sanitizeDocumentId,
} = require("./index");
test("getConfig defaults to the ingress API URL", () => {
const config = getConfig({
coreModule: {
getInput() {
return "";
},
},
githubModule: {
context: {
serverUrl: "https://github.example",
},
},
env: {},
});
assert.equal(config.apiUrl, "http://agent-api.k8s.private");
assert.equal(config.route, "agent-lake");
assert.equal(config.method, "embeddings_insert");
});
test("sanitizeDocumentId removes special characters and preserves periods", () => {
assert.equal(