Error with One-way sync from Jira to GitHub - Jira Component field to GitHub PR labels

Hi there!

We’ve been trying to configure a one-way sync from Jira to GitHub, where we want to:

  • Sync the Jira Component field to GitHub PR labels

  • Never sync anything from GitHub back to Jira (truly one-way)

We’ve run into the following persistent error when syncing issues like PGM-351 and PGM-352:

Sync rules result validation error: One or more labels in ‘hubIssue.getLabels’ is not of type IHubLabel but java.lang.String

These are the Outgoing and Incoming rules on the Jira side:

There are no Triggers on Github side and this is the rule for Incoming

The error you’re seeing—One or more labels in ‘hubIssue.getLabels’ is not of type IHubLabel but java.lang.String—typically happens when the labels being assigned in your sync rules are plain strings, but Exalate expects them to be label objects (IHubLabel) on the GitHub side.

To sync the Jira Component field to GitHub PR labels, you need to ensure that when you assign labels in your sync script, you use the correct label object format. You can do this using the nodeHelper.getLabel() method, which creates a label object from a string.

Here’s how you can adjust your sync rules:

On the Jira Outgoing sync:
Map the Jira Component(s) to the replica, for example:

replica.components = issue.components

On the GitHub Incoming sync:
Convert the component names to label objects:

issue.labels = (replica.components ?: []).collect { nodeHelper.getLabel(it.name) }

This ensures that each component name is wrapped as a label object, which resolves the type error.

For a truly one-way sync, make sure your GitHub Outgoing and Jira Incoming rules do not sync anything back.

You can find more details in the documentation:

This approach should resolve the validation error and achieve your one-way sync from Jira Components to GitHub PR labels.

Here is the Rule on Github side: