PR Style Bot workflow (huggingface/lighteval)
The PR Style Bot workflow from huggingface/lighteval, explained and optimized by Latchkey.
A
CI health: A - excellent
Run this on Latchkey for self-healing, caching, and up to 58% lower cost.
Grade your own workflow free or run it on Latchkey →What it does
This is the PR Style Bot workflow from the huggingface/lighteval repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
workflow (.yml)
name: PR Style Bot
on:
issue_comment:
types: [created]
permissions:
pull-requests: write
contents: read
jobs:
style:
uses: huggingface/huggingface_hub/.github/workflows/style-bot-action.yml@42642d4a896bd43a8360b29f5f32934232f4db32
with:
python_quality_dependencies: "[quality]"
secrets:
app_id: ${{ secrets.HF_BOT_STYLE_APP_ID }}
app_private_key: ${{ secrets.HF_BOT_STYLE_SECRET_PEM }}
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: PR Style Bot on: issue_comment: types: [created] permissions: pull-requests: write contents: read jobs: style: timeout-minutes: 30 uses: huggingface/huggingface_hub/.github/workflows/style-bot-action.yml@42642d4a896bd43a8360b29f5f32934232f4db32 with: python_quality_dependencies: "[quality]" secrets: app_id: ${{ secrets.HF_BOT_STYLE_APP_ID }} app_private_key: ${{ secrets.HF_BOT_STYLE_SECRET_PEM }}
What changed
- Add a job timeout so a hung step cannot burn hours of runner time.
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.