Skip to content

fix: address 3 review issues from PR #17 (recruiter mode)#18

Open
nianyi778 wants to merge 16 commits into
jackwener:mainfrom
nianyi778:fix/pr17-review-issues
Open

fix: address 3 review issues from PR #17 (recruiter mode)#18
nianyi778 wants to merge 16 commits into
jackwener:mainfrom
nianyi778:fix/pr17-review-issues

Conversation

@nianyi778

Copy link
Copy Markdown

Summary

This PR applies the 3 fixes identified during code review of #17 (recruiter mode), to unblock that merge.

Changes

1. Restore CI badge URL (README.md)

The badge was pointing to the contributor's fork (chengyixu/boss-cli). Restored to the upstream repo (jackwener/boss-cli).

2. Remove fork-specific "Fork note" (README.md)

Removed the > **Fork note:** ... line that was fork-internal metadata, not appropriate for the upstream README.

3. Remove duplicate constant (boss_cli/constants.py)

BOSS_VIEW_GEEK_INFO_URL and BOSS_VIEW_GEEK_URL both defined /wapi/zpjob/view/geek/info. The former was never imported or used anywhere — only BOSS_VIEW_GEEK_URL is referenced in client.py. Removed the dead constant.

Relationship to #17

This PR targets main. Suggested merge order:

  1. Merge this PR into main
  2. Rebase feat: add recruiter (雇主端) mode — 20 commands for employers #17 on top of updated main (the 3 conflicts will be resolved), then merge feat: add recruiter (雇主端) mode — 20 commands for employers #17

Or alternatively, @chengyixu can cherry-pick these 3 fixes into the feature/recruiter-mode branch and this PR can be closed.

Related: #17

🤖 Generated with Claude Code

chengyixu and others added 12 commits April 2, 2026 15:16
Adds employer-side functionality for BOSS直聘 recruiters:

- `boss recruiter-jobs` — list posted jobs
- `boss recruiter-inbox` — view candidate chat list with last messages
- `boss recruiter-geek <id>` — view detailed candidate profile
- `boss recruiter-chat <friendId>` — view chat history with candidate
- `boss recruiter-labels` — list candidate tags
- `boss recruiter-export` — export candidates to CSV/JSON

All commands support --json/--yaml structured output and follow the
existing CLI patterns (rate limiting, session handling, rich tables).

Closes jackwener#10

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add usage examples, workflow guide, and Chinese docs for the
6 new recruiter commands. Update project structure and badges.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…group

Restructure recruiter commands from 6 flat commands to a proper Click
subcommand group with 12 commands matching issue jackwener#10 spec:

New commands:
- `boss recruiter search` — search candidates with city/exp/degree/salary
- `boss recruiter recommend` — recommended candidates (greetRecSortList)
- `boss recruiter greet` — initiate conversation with candidate
- `boss recruiter batch-greet` — batch greet with --dry-run support
- `boss recruiter reply` — send message to candidate (with confirmation)
- `boss recruiter resume` — full resume view (work, education, projects)

Preserved from v1:
- `boss recruiter jobs/inbox/geek/chat/labels/export`

New BossClient methods: search_geeks, get_boss_recommend_geeks,
get_boss_view_geek, boss_send_message. Resume auto-fetches securityId
from friend list when not provided.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add -p/--page to recommend and inbox commands for scrolling
- Add --job filter to recommend for switching between 岗位
- Add resume-download command: exports resume as Markdown file
- Add job-close/job-reopen commands for job lifecycle management
- Add pagination hints and job switching hints to command output
- get_boss_friend_list now accepts page parameter

15 total commands under `boss recruiter` subgroup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ume download

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…e-interview, mark-unsuitable

5 new commands matching BOSS直聘 recruiter chat page actions:
- `boss recruiter request-resume` — 求简历
- `boss recruiter exchange-phone` — 换电话
- `boss recruiter exchange-wechat` — 换微信
- `boss recruiter invite-interview` — 约面试
- `boss recruiter mark-unsuitable` — 不合适

All require --yes or confirmation prompt. Include __zp_stoken__
hint when anti-bot protection blocks the action.

20 total commands under `boss recruiter`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ected endpoints

- Add X-Requested-With and zp_token (from bst cookie) to all requests
- Handle code 121/122 (warlock anti-bot) with clear error message
- Protected actions (exchange, interview, mark) now explain the limitation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The recommend (greetRecSortList) and inbox (filterByLabel) APIs return
ALL results in a single call — the page parameter is ignored server-side.
Replace -p/--page with -n/--limit for client-side display limiting.
Update hints to show label filtering and job switching instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… 404 gracefully

- boss_interview_invite now sends JSON body (not form-encoded) to match API
- boss_exchange_request includes gid=uid param required by the API
- _request handles 404 responses that contain JSON (anti-bot responses)
- _post supports json_body=True parameter for JSON POST requests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Restore CI badge URL to jackwener/boss-cli (was pointing to fork)
- Remove fork-specific "Fork note:" from README
- Remove duplicate BOSS_VIEW_GEEK_INFO_URL constant (same value as
  BOSS_VIEW_GEEK_URL, which is the one actually imported and used)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants