Every way a company gets a board is set_board, and an unreadable host keeps its slug
`app.jobs.sources.set_board` attaches a board to an existing company,
replaces the one it has (closing the old board's open roles) or creates
the company, with row and subscription changed in one transaction by
`Store.set_company_board`. A board that lists zero roles is kept. `add`,
`discover --add`, the seed importer (moved out of app/cli.py) and the new
`POST|DELETE /api/companies/{key}/board` all go through it; a seed re-run
attaches a board to a row that never had one. A company's subscription is
rewritten in place, and detaching hides it.
`companies.ats_slug` (migration 9) keeps the slug of a host the app
cannot read yet, and discovery returns such a host before probing slugs.
The Companies rows get Set board / Change, the host select is rendered
from `plugins.ats.HOSTS`, and a row with nothing found reads "board not
found" and is in the "Not readable yet" filter.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
0558ef19ed
commit
3b209d628a
18 files changed
+1038
-178
No files matched your search
@@ -72,6 +72,16 @@ _BOARDS: dict[str, tuple[str, str]] = {
|
||||
"https://{slug}.jobs.personio.de"),
|
||||
}
|
||||
|
||||
#: host -> the name the host gives itself: the hosts this plugin reads, in
|
||||
#: the order a select offers them. What the Sources page's host select is
|
||||
#: rendered from, so it cannot offer a host `is_known_target` refuses.
|
||||
HOSTS: dict[str, str] = {
|
||||
"greenhouse": "Greenhouse", "lever": "Lever", "ashby": "Ashby",
|
||||
"workable": "Workable", "smartrecruiters": "SmartRecruiters",
|
||||
"recruitee": "Recruitee", "personio": "Personio",
|
||||
}
|
||||
assert set(HOSTS) == set(_BOARDS)
|
||||
|
||||
#: The hosts a request or a redirect may land on for a given board host — a
|
||||
#: fixed API host for five of them, and the company's own subdomain for the
|
||||
#: two that put the slug in the hostname. Anything else is refused, at the
|
||||
|
||||
Reference in new issue
Block a user