feat(integrations): add labels integration and expose shared IntegrationApi
Add a new labels integration (src-tauri/src/integrations/labels.rs) that implements listing, reading and updating issue labels for multiple providers (GitHub, Gitea, GitLab and Azure DevOps). The new module provides Tauri commands: - list_integration_labels - get_integration_issue_labels - set_integration_issue_labels Refactor assignees integration to make core HTTP helpers reusable: - Rename AssignmentApi -> IntegrationApi and make its fields/methods pub(super). - Make helper functions api_url, repository_parts and target_url pub(super) so labels.rs can construct and call provider endpoints. - Adjust wording of a few error messages (e.g. "Assignment request..." -> "Integration request...") and genericize some page/result error text. Export the new labels module from integrations.rs and relax test helper visibility (pub(crate)) so the labels tests can reuse the existing fixture utilities. This commit introduces provider-specific parsing and payload logic for labels and reuses the shared IntegrationApi to perform authenticated requests.
This commit is contained in:
@@ -524,3 +524,10 @@ export interface AssignmentTarget {
|
||||
number: number;
|
||||
kind: "issue" | "review";
|
||||
}
|
||||
|
||||
export interface IntegrationLabel {
|
||||
id: string;
|
||||
name: string;
|
||||
color: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user