Summary
Before applying labels through the GitHub API, Maintainer Agent Kit should avoid adding labels that are already present on the issue.
Why this matters
This makes action logs cleaner and avoids unnecessary API calls.
Suggested behavior
If the issue already has a label, skip it and log a clear message.
Example:
Skipping existing label: bug
Adding new label: good first issue
Acceptance criteria
Read existing labels from the issue payload or GitHub API response
Filter out labels that already exist
Keep label order deterministic
Add tests for duplicate label handling
Update action logs
Summary
Before applying labels through the GitHub API, Maintainer Agent Kit should avoid adding labels that are already present on the issue.
Why this matters
This makes action logs cleaner and avoids unnecessary API calls.
Suggested behavior
If the issue already has a label, skip it and log a clear message.
Example: