Skip to content

qqrm/rust-hh-feed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

149 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust-hh-feed

This project collects job postings related to the Rust programming language from HeadHunter every 30 minutes and posts them to a Telegram channel. You can join the Telegram channel at RustHH Jobs.

Main Features

  • Query the hh.ru API for fresh vacancies using keywords such as rust, rust-разработчик, rust-developer, rust-programmer, and rust-программист.
  • Filter vacancies where "Rust" appears in the title.
  • Publish the results to a Telegram channel via a bot.
  • Schedule the process to run every 30 minutes.

Components

  1. HeadHunter parser — a Rust module that queries the API.
  2. Collector and filter — processes vacancies and selects relevant ones.
  3. Telegram bot — sends messages to the channel.
  4. Scheduler — triggers the collection and posting.

Documentation

Configuration

The bot expects a few environment variables:

Variable Purpose
TELEGRAM_BOT_TOKEN Telegram bot token
TELEGRAM_CHAT_ID ID of the channel to post jobs
HH_BASE_URL Override base URL for the HeadHunter API
TELEGRAM_API_BASE_URL Override base URL for the Telegram Bot API
POSTED_JOBS_PATH Path to the JSON file with already posted jobs
MANUAL_MODE Set to true to skip saving posted jobs
JOB_RETENTION_DAYS Maximum age in days to keep posted job IDs

The file referenced by POSTED_JOBS_PATH is not committed to the repository. It is downloaded from the previous workflow run and uploaded back as an artifact after each execution.

During continuous integration the workflow sets TELEGRAM_CHAT_ID to a development channel. Scheduled runs and manual releases use the production chat ID.

Set the RUST_LOG environment variable to control the logging level, for example RUST_LOG=info.

Create a .env file using .env.example as a template.

Quiet CI Logs

When running CI workflows you can suppress crate download and compilation messages by adding --quiet to the Cargo commands. For example:

cargo clippy --quiet --all-targets --all-features -- -D warnings
cargo test --quiet
cargo run --release --quiet

This keeps the logs short while still printing warnings and errors.

Continuous Integration

Pull requests trigger the ci.yml workflow that checks formatting, lint rules, cargo machete, and tests. The post.yml workflow builds and runs the application either on schedule or manually. After ci.yml succeeds, the auto_merge.yml workflow merges the pull request using the gh CLI. Dependabot now manages three update surfaces:

  • Cargo crates from Cargo.toml and Cargo.lock
  • GitHub Actions used in .github/workflows/
  • Rust toolchain versions from rust-toolchain.toml

The dependabot-automerge.yml workflow enables auto-merge only for Dependabot patch and minor updates. Merges are configured with --auto, so GitHub merges the pull request only after all required CI checks pass.

The CI job caches Cargo dependencies and build artifacts to speed up subsequent runs. For each update to the main branch the same workflow uploads the latest compiled binary to the latest release. You can also download artifacts directly from the workflow run page.

Additional workflows automate repository maintenance:

  • pr_cleanup.yml cancels running CI jobs and deletes the branch after a pull request is merged while skipping its own run.
  • manual_release.yml allows manual execution of the bot through the GitHub UI.
  • The cleanup-old-runs job inside post.yml deletes completed runs of all workflows after three days using GITHUB_TOKEN with the actions: write permission.

Release Binary

A push to the main branch updates the latest release with a freshly built executable. Only one file, rust-hh-feed, is kept in the release. Download it with:

curl -L https://github.com/<owner>/<repo>/releases/latest/download/rust-hh-feed -o rust-hh-feed

License

This project is licensed under the MIT license.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages