feat: Ashby adapter for fetch-jd.ts - #91
Closed
Samhit21 wants to merge 1 commit into
Closed
Conversation
Add Ashby to the ATS-fetch dispatch table:
- URL parse: `jobs.ashbyhq.com/{token}/{uuid}` → { token, uuid }.
jobId pattern is strict (UUID v4 shape), so a non-UUID tail falls
through to the next parser instead of producing a 404 on the API.
- Fetch: `https://api.ashbyhq.com/posting-api/job-board/{token}`
returns the whole board; find the posting by id, return
title / company / descriptionHtml. CORS open, no auth.
Tests:
- URL parser test (matches existing adapter style).
- Negative URL parse test for non-UUID jobId.
- Mocked-fetch end-to-end test asserting the API URL, the picked-up
posting, and that the descriptionHtml is plaintext on the way out.
- Mocked tests for the missing-id and non-2xx fallbacks (return null).
Refs #74
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/lib/jd-match/fetch-jd.ts's dispatch table — fifth platform after Greenhouse, Lever, Workable, Recruitee. Follows the existing adapter shape so the public surface (fetchJdFromUrl) doesn't change.jobs.ashbyhq.com/{token}/{uuid}and pulls outtoken(job-board slug, becomescompany) + the UUID jobId. UUID-strict so non-UUID tails fall through instead of producing a 404 on the API.https://api.ashbyhq.com/posting-api/job-board/{token}— public, no auth, CORS-open — finds the posting by id, returnstitle / company / descriptionHtml. The sharedhtmlToPlaintextstrip on the way out is reused.Files
src/lib/jd-match/fetch-jd.ts—AtsPlatformunion,parseAshbyUrl,fetchAshbyJob, dispatch entry.src/lib/jd-match/fetch-jd.test.ts— URL parse test + non-UUID rejection + mocked-fetch end-to-end (happy path, missing-id, non-2xx).Test plan
npm run test— 347/347 green (+3 new)npm run typecheck— cleannpm run build— cleanRefs #74
🤖 Generated with Claude Code