Quick overview
This workflow runs daily to fetch GitHub Trending repositories, summarizes them with an OpenAI-compatible chat completions API, renders a single-page HTML report, uploads it to htmlhoster for a public link, and posts the report to DingTalk and/or Feishu group bots.
How it works
- Runs every day at 09:00 (cron) to start the reporting cycle.
- Downloads the GitHub Trending (daily) page and parses the top N repositories with their metadata (stars, forks, language, and stars gained today).
- Fetches each repository’s README from raw.githubusercontent.com (when enabled) and trims it to a configured character limit.
- Sends the curated repository data to an OpenAI-compatible Chat Completions endpoint to generate a JSON briefing with per-repo insights.
- Renders the AI output (or falls back to a raw list if the AI call fails) into a styled, single-file HTML report.
- Uploads the HTML file to htmlhoster via htmlhoster agent and retrieves a public entry URL.
- Builds and sends signed webhook messages to DingTalk and/or Feishu that include a short summary, top projects, and the report link.
Setup
- Add a Generic Header Auth credential for your OpenAI-compatible API (set
Authorization: Bearer <token>) and confirm the API URL and model in the configuration values.
- Configure your DingTalk robot webhook URL (and signing secret if enabled) and/or your Feishu bot webhook URL (and signing secret if enabled).
- Adjust optional settings like repository count, whether to fetch READMEs, and the README character limit to control runtime and token usage.
- Ensure your environment can access GitHub and raw.githubusercontent.com, and note that the uploaded htmlhoster report is public and subject to htmlhoster upload limits.