Github Action icon

Github Action

Github Action

Actions4

Issue → Update Labels

AI-generated

Overview

This node updates labels on a specified GitHub issue. It allows users to add new labels and remove existing labels from an issue within a repository. This is useful for managing issue categorization and tracking in GitHub projects, such as marking issues as bugs, enhancements, or priorities.

Use Case Examples

  1. Add labels 'bug' and 'urgent' to issue #123 in the 'my-repo' repository owned by 'my-user'.
  2. Remove the label 'wontfix' from issue #45 in the 'example-repo' repository owned by 'example-owner'.

Properties

Name Meaning
Owner Owner of the Issue Repository, used to identify the GitHub repository owner for the issue.
Repository Repository of the Issue, specifies the repository name where the issue exists.
Issue Number Number of the targeted Issue, identifies the specific issue to update labels on.
Labels to Add Labels to add to the issue, allows multiple label names to be specified for addition.
Labels to Remove Labels to remove from the issue, allows multiple label names to be specified for removal.

Output

JSON

  • action_issue_owner - Owner of the Issue Repository
  • action_issue_repository - Repository of the Issue
  • action_issue_issueNumber - Number of the targeted Issue
  • action_issue_labelsToAdd
    • parameter
      * value - Names of labels added to the issue
  • action_issue_labelsToRemove
    • parameter
      * value - Names of labels removed from the issue

Dependencies

  • GitHub API authentication via OAuth2 token

Troubleshooting

  • Ensure the OAuth2 API credentials are correctly configured and have permissions to modify issues in the target repository.
  • Verify that the issue number exists in the specified repository; otherwise, the update will fail.
  • Labels to add or remove must exist in the repository or be valid label names; invalid labels may cause errors.

Links

Discussion