Label Action
Automatically add or remove labels
The Label Action allows you to automatically add or remove labels from pull requests based on validation results. This is useful for categorizing PRs, highlighting issues, or tracking progress through your workflow.
Configuration
Label(s) to add to the PR
Label(s) to remove from the PR
Basic Usage
Examples
Simple Labeling
Add a label when validations pass:
Multiple Labels
Add multiple labels at once:
Conditional Labeling
Add different labels based on different rules:
State Management
Manage PR state through labels:
How It Works
Get Current Labels
The action retrieves the current labels on the PR
Calculate Changes
It determines which labels need to be added and which need to be removed
Update Labels
It updates the PR with the new set of labels
Use Cases
Workflow Status
Track PR status in your workflow:
PR Size Categories
Categorize PRs by size:
Component Labeling
Automatically label PRs based on the files they change:
Best Practices
Avoid creating too many labels, as this can become confusing for contributors
Limitations
- Labels must already exist in the repository
- Label names are case-sensitive
- You can’t create new labels through this action