feat: Label management API with fluent builder #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Implements a comprehensive label management system with support for creating, updating, deleting, and querying labels at both the repository and issue level with a fluent API for batch operations and color management.
Closes #23
Changes
Label DTO Enhancements
defaultfield to Label DTO to track default labelshexColor()method to get color with#prefixisLightColor()method to detect light/dark colors using brightness calculationRepository-Level Label Management
all()- Get all repository labelsfind(string $name)- Get a specific labelcreate(string $name, string $color, ?string $description)- Create new labelupdate(string $name, array $attributes)- Update existing labeldelete(string $name)- Delete a labelsync(array $labels)- Sync labels from array (create/update/delete)builder()- Get fluent builder instanceIssue-Level Label Management
all()- Get all labels for an issueadd(string|array $labels)- Add single or multiple labelsremove(string $label)- Remove a labelset(array $labels)- Replace all labelsclear()- Remove all labelsFluent Label Builder
name(string $name)- Set label namecolor(string $color)- Set custom colordescription(string $description)- Set descriptionred()- d73a4a (bugs, critical)orange()- d4a72c (warnings)yellow()- fef2c0 (needs attention)green()- 0e8a16 (improvements)blue()- 1d76db (information)purple()- 5319e7 (questions)pink()- e99695 (design)gray()- d1d5da (stale)create()- Execute label creationRequest Classes
Created 10 new Saloon Request classes for GitHub API integration:
Usage Examples
Testing
Quality Gates