Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion client/ayon_kitsu/plugins/publish/integrate_kitsu_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class IntegrateKitsuReview(KitsuPublishInstancePlugin):
families = ["kitsu"]
optional = True

match_version_number = True

def process(self, instance):
# Check comment has been created
comment_id = instance.data.get("kitsuComment", {}).get("id")
Expand Down Expand Up @@ -45,6 +47,10 @@ def process(self, instance):
comment=comment_id,
preview_file_path=review_path,
normalize_movie=True,
revision=instance.data["version"],
revision=(
instance.data["version"]
if self.match_version_number
else None
),
)
self.log.info("Review upload on comment")
19 changes: 18 additions & 1 deletion server/settings/publish_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,16 @@ class IntegrateKitsuNotes(BaseSettingsModel):
title="Custom Comment Template",
)

class IntegrateKitsuReviews(BaseSettingsModel):
match_version_number: bool = SettingsField(
title="Match version number",
description=(
"Set Kitsu note revision to match AYON version number.\n\n"
"Note: If enabled avoid uploading reviewables directly"
" into Kitsu without passing through AYON, as this can desynchronize"
" product version and revision number and cause errors during publish."
)
)

class PublishPlugins(BaseSettingsModel):
CollectKitsuFamily: CollectKitsuFamilyPluginModel = SettingsField(
Expand All @@ -114,6 +124,10 @@ class PublishPlugins(BaseSettingsModel):
default_factory=IntegrateKitsuNotes,
title="Integrate Kitsu Note"
)
IntegrateKitsuReview: IntegrateKitsuReviews = SettingsField(
default_factory=IntegrateKitsuReviews,
title="Integrate Kitsu Review"
)


PUBLISH_DEFAULT_VALUES = {
Expand Down Expand Up @@ -294,5 +308,8 @@ class PublishPlugins(BaseSettingsModel):
| family | `{family}` |
| name | `{name}` |""",
},
}
},
"IntegrateKitsuReview": {
"match_version_number": True,
},
}
Loading