The Auto Labeller Bot is a GitHub Action that automatically labels issues using a Hugging Face model. When an issue is opened, the bot uses the Hugging Face API to predict the appropriate labels based on the issue's content.
- Automatically labels GitHub issues using a specified Hugging Face model.
- Supports custom models by specifying the model name.
- Uses the Hugging Face Inference Endpoint for predictions.
- A Hugging Face API token. You may generate one at Hugging Face Settings. Ensure it has the following permissions enabled:
- Make calls to the serverless Inference API
- Make calls to Inference Endpoints
- A GitHub repository with issues enabled.
-
Add Secrets: Add your Hugging Face API token to your repository secrets. Go to your repository settings, then to the "Secrets and variables" section, and add a new secret named
HF_API_KEY
. -
Copy Workflow File: Copy the
usage.yml
file into the.github/workflows
directory of your repository.name: "Hugging Face Issue Labeler" on: issues: types: opened jobs: triage: runs-on: ubuntu-latest permissions: issues: write steps: - uses: actions/checkout@v3 - uses: August-murr/auto-labeler@main with: hf-api-key: ${{ secrets.HF_API_KEY }}
-
Configure Model Name: In the
usage.yml
file, you can specify the model name you want to use. The default model ismeta-llama/Llama-3.3-70B-Instruct
.
Once the setup is complete, the bot will automatically label new issues based on the specified Hugging Face model. The bot will analyze the issue's title and body to predict the most appropriate labels.
When an issue is opened, the bot will:
- Retrieve the issue content.
- Generate a prompt for the Hugging Face model.
- Use the Hugging Face API to get label predictions.
- Apply the predicted labels to the issue.
If you want to contribute to this project, feel free to open a pull request or submit an issue.