def autolabel_pull_request(issue_prefixes, project: true, components: true, labels: false)
      raise NotConfiguredError unless @jira_client
      raise(ArgumentError, "issue_prefixes cannot be empty") if issue_prefixes.empty?

      issue_keys = extract_issue_keys_from_pull_request(issue_prefixes)
      return if issue_keys.empty?

      labels = fetch_labels_from_issues(
        issue_keys,
        project: project,
        components: components,
        labels: labels
      )
      return if labels.empty?

      create_missing_github_labels(labels)
      add_labels_to_issue(labels)

      labels
    end
def autolabel_pull_request(issue_prefixes, project: true, components: true, labels: false)
      raise NotConfiguredError unless @jira_client
      raise(ArgumentError, "issue_prefixes cannot be empty") if issue_prefixes.empty?

      issue_keys = extract_issue_keys_from_pull_request(issue_prefixes)
      return if issue_keys.empty?

      labels = fetch_labels_from_issues(
        issue_keys,
        project: project,
        components: components,
        labels: labels
      )
      return if labels.empty?

      create_missing_github_labels(labels)
      add_labels_to_issue(labels)

      labels
    end
Labels the Pull Request with Jira Project Keys and Component Names

 @param issue_prefixes [Array<String>] An array of issue key prefixes;
   this is often the project key. These must be present in the title or
   body of the Pull Request
 @param project [Boolean] Label using the Jira Ticket's Project Key?
 @param components [Boolean] Label using the Jira Ticket's Component Names?
 @param labels [Boolean] Label using the Jira Ticket's Labels?

 @return [Array<String>, nil] The list of project & component labels
   that were applied or nil if no issue or labels were found