From 00f2e16dca2cb37a53a4a6b3096c0f11142a9b66 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Sun, 26 Feb 2023 10:23:39 +0000 Subject: [PATCH 01/38] Static implementation. --- openpype/hosts/maya/plugins/publish/collect_review.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/openpype/hosts/maya/plugins/publish/collect_review.py b/openpype/hosts/maya/plugins/publish/collect_review.py index eb872c2935..c76d4bae97 100644 --- a/openpype/hosts/maya/plugins/publish/collect_review.py +++ b/openpype/hosts/maya/plugins/publish/collect_review.py @@ -139,3 +139,13 @@ class CollectReview(pyblish.api.InstancePlugin): "filename": node.filename.get() } ) + + # Collect focal length. + data = { + "cameraFocalLength": cmds.getAttr(camera + ".focalLength") + } + + try: + instance.data["customData"].update(data) + except KeyError: + instance.data["customData"] = data From e9eb09e100d990e5a6d8648ff32df0d3e7ec4969 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Wed, 22 Mar 2023 12:58:33 +0000 Subject: [PATCH 02/38] Initial working version --- .../maya/plugins/publish/collect_review.py | 23 +++-- openpype/lib/execute.py | 7 ++ openpype/plugins/publish/extract_burnin.py | 4 + openpype/scripts/otio_burnin.py | 87 +++++++++++++++++-- 4 files changed, 109 insertions(+), 12 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/collect_review.py b/openpype/hosts/maya/plugins/publish/collect_review.py index 80fd5b0dbd..3d3ee09eed 100644 --- a/openpype/hosts/maya/plugins/publish/collect_review.py +++ b/openpype/hosts/maya/plugins/publish/collect_review.py @@ -146,11 +146,24 @@ class CollectReview(pyblish.api.InstancePlugin): ) # Collect focal length. - data = { - "cameraFocalLength": cmds.getAttr(camera + ".focalLength") - } + #Refactor to lib or use available lib method. + plug = "{0}.focalLength".format(camera) + focal_length = None + if not cmds.listConnections(plug, destination=False, source=True): + # Static. + focal_length = cmds.getAttr(plug) + else: + # Dynamic. + start = instance.data["frameStart"] + end = instance.data["frameEnd"] + 1 + focal_length = [ + cmds.getAttr(plug, time=t) for t in range(int(start), int(end)) + ] + + key = "focalLength" + instance.data[key] = focal_length try: - instance.data["customData"].update(data) + instance.data["burninDataMembers"].append(key) except KeyError: - instance.data["customData"] = data + instance.data["burninDataMembers"] = [key] diff --git a/openpype/lib/execute.py b/openpype/lib/execute.py index 759a4db0cb..5ba62f177f 100644 --- a/openpype/lib/execute.py +++ b/openpype/lib/execute.py @@ -8,6 +8,8 @@ import tempfile from .log import Logger from .vendor_bin_utils import find_executable +from .openpype_version import is_running_from_build + # MSDN process creation flag (Windows only) CREATE_NO_WINDOW = 0x08000000 @@ -196,6 +198,11 @@ def run_openpype_process(*args, **kwargs): # Skip envs that can affect OpenPype process # - fill more if you find more env = clean_envs_for_openpype_process(os.environ) + + # Add OpenPype version if we are running from build. + if not is_running_from_build(): + env.pop("OPENPYPE_VERSION", None) + return run_subprocess(args, env=env, **kwargs) diff --git a/openpype/plugins/publish/extract_burnin.py b/openpype/plugins/publish/extract_burnin.py index f113e61bb0..de876c8486 100644 --- a/openpype/plugins/publish/extract_burnin.py +++ b/openpype/plugins/publish/extract_burnin.py @@ -254,6 +254,10 @@ class ExtractBurnin(publish.Extractor): # Add context data burnin_data. burnin_data["custom"] = custom_data + # Add data members. + for key in instance.data.get("burninDataMembers", []): + burnin_data[key] = instance.data[key] + # Add source camera name to burnin data camera_name = repre.get("camera_name") if camera_name: diff --git a/openpype/scripts/otio_burnin.py b/openpype/scripts/otio_burnin.py index cb4646c099..bb7a208103 100644 --- a/openpype/scripts/otio_burnin.py +++ b/openpype/scripts/otio_burnin.py @@ -4,8 +4,10 @@ import re import subprocess import platform import json -import opentimelineio_contrib.adapters.ffmpeg_burnins as ffmpeg_burnins +import tempfile +from string import Formatter +import opentimelineio_contrib.adapters.ffmpeg_burnins as ffmpeg_burnins from openpype.lib import ( get_ffmpeg_tool_path, get_ffmpeg_codec_args, @@ -23,7 +25,7 @@ FFMPEG = ( ).format(ffmpeg_path) DRAWTEXT = ( - "drawtext=fontfile='%(font)s':text=\\'%(text)s\\':" + "drawtext@'%(label)s'=fontfile='%(font)s':text=\\'%(text)s\\':" "x=%(x)s:y=%(y)s:fontcolor=%(color)s@%(opacity).1f:fontsize=%(size)d" ) TIMECODE = ( @@ -39,6 +41,34 @@ TIMECODE_KEY = "{timecode}" SOURCE_TIMECODE_KEY = "{source_timecode}" +def convert_list_to_cmd(list_to_convert, fps, label=""): + path = None + #need to clean up temp file when done + with tempfile.NamedTemporaryFile(mode="w", delete=False) as f: + for i, value in enumerate(list_to_convert): + seconds = i / fps + + # Escape special character + value = str(value).replace(":", "\\:") + + filter = "drawtext" + if label: + filter += "@" + label + + line = ( + "{start} {filter} reinit text='{value}';" + "\n".format(start=seconds, filter=filter, value=value) + ) + + f.write(line) + f.flush() + path = f.name + path = path.replace("\\", "/") + path = path.replace(":", "\\:") + + return "sendcmd=f='{}'".format(path) + + def _get_ffprobe_data(source): """Reimplemented from otio burnins to be able use full path to ffprobe :param str source: source media file @@ -144,7 +174,7 @@ class ModifiedBurnins(ffmpeg_burnins.Burnins): self.options_init.update(options_init) def add_text( - self, text, align, frame_start=None, frame_end=None, options=None + self, text, align, frame_start=None, frame_end=None, options=None, cmd="" ): """ Adding static text to a filter. @@ -165,7 +195,13 @@ class ModifiedBurnins(ffmpeg_burnins.Burnins): if frame_end is not None: options["frame_end"] = frame_end - self._add_burnin(text, align, options, DRAWTEXT) + draw_text = DRAWTEXT + if cmd: + draw_text = "{}, {}".format(cmd, DRAWTEXT) + + options["label"] = align + + self._add_burnin(text, align, options, draw_text) def add_timecode( self, align, frame_start=None, frame_end=None, frame_start_tc=None, @@ -501,7 +537,7 @@ def burnins_from_data( if not value: continue - if isinstance(value, (dict, list, tuple)): + if isinstance(value, (dict, tuple)): raise TypeError(( "Expected string or number type." " Got: {} - \"{}\"" @@ -573,8 +609,43 @@ def burnins_from_data( burnin.add_timecode(*args) continue - text = value.format(**data) - burnin.add_text(text, align, frame_start, frame_end) + cmd = "" + text = None + keys = [i[1] for i in Formatter().parse(value) if i[1] is not None] + list_to_convert = [] + + # Warn about nested dictionary support for lists. Ei. we dont support + # it. + if "[" in "".join(keys): + print( + "We dont support converting nested dictionaries to lists," + " so skipping {}".format(value) + ) + else: + for key in keys: + data_value = data[key] + + # Multiple lists are not supported. + if isinstance(data_value, list) and list_to_convert: + raise ValueError( + "Found multiple lists to convert, which is not " + "supported: {}".format(value) + ) + + if isinstance(data_value, list): + print("Found list to convert: {}".format(data_value)) + for v in data_value: + data[key] = v + list_to_convert.append(value.format(**data)) + + if list_to_convert: + text = list_to_convert[0] + cmd = convert_list_to_cmd(list_to_convert, 25.0, label=align)# need to fetch fps properly + print("cmd: " + cmd) + else: + text = value.format(**data) + print(text) + burnin.add_text(text, align, frame_start, frame_end, cmd=cmd) ffmpeg_args = [] if codec_data: @@ -613,6 +684,8 @@ if __name__ == "__main__": with open(in_data_json_path, "r") as file_stream: in_data = json.load(file_stream) + print(json.dumps(in_data, indent=4, sort_keys=True)) + burnins_from_data( in_data["input"], in_data["output"], From 9eadc11941f4cffc6b1061f56f9751efd848c7de Mon Sep 17 00:00:00 2001 From: Toke Jepsen Date: Wed, 22 Mar 2023 14:58:14 +0000 Subject: [PATCH 03/38] Update openpype/scripts/otio_burnin.py Co-authored-by: Roy Nieterau --- openpype/scripts/otio_burnin.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/openpype/scripts/otio_burnin.py b/openpype/scripts/otio_burnin.py index bb7a208103..e7c165ba0e 100644 --- a/openpype/scripts/otio_burnin.py +++ b/openpype/scripts/otio_burnin.py @@ -684,8 +684,6 @@ if __name__ == "__main__": with open(in_data_json_path, "r") as file_stream: in_data = json.load(file_stream) - print(json.dumps(in_data, indent=4, sort_keys=True)) - burnins_from_data( in_data["input"], in_data["output"], From 22dac59ccf3d6269ec582c15de387fb23bc0e8e9 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Wed, 22 Mar 2023 14:58:46 +0000 Subject: [PATCH 04/38] Store burnin data as dictionary directly. --- openpype/hosts/maya/plugins/publish/collect_review.py | 6 ++---- openpype/plugins/publish/extract_burnin.py | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/collect_review.py b/openpype/hosts/maya/plugins/publish/collect_review.py index 3d3ee09eed..0857e8224d 100644 --- a/openpype/hosts/maya/plugins/publish/collect_review.py +++ b/openpype/hosts/maya/plugins/publish/collect_review.py @@ -161,9 +161,7 @@ class CollectReview(pyblish.api.InstancePlugin): ] key = "focalLength" - instance.data[key] = focal_length - try: - instance.data["burninDataMembers"].append(key) + instance.data["burninDataMembers"][key] = focal_length except KeyError: - instance.data["burninDataMembers"] = [key] + instance.data["burninDataMembers"] = {key: focal_length} diff --git a/openpype/plugins/publish/extract_burnin.py b/openpype/plugins/publish/extract_burnin.py index de876c8486..8d29f814b5 100644 --- a/openpype/plugins/publish/extract_burnin.py +++ b/openpype/plugins/publish/extract_burnin.py @@ -255,8 +255,7 @@ class ExtractBurnin(publish.Extractor): burnin_data["custom"] = custom_data # Add data members. - for key in instance.data.get("burninDataMembers", []): - burnin_data[key] = instance.data[key] + burnin_data.update(instance.data.get("burninDataMembers", {})) # Add source camera name to burnin data camera_name = repre.get("camera_name") From f0bdc76183098782b1b42b37db8bb9386f3f864a Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Wed, 22 Mar 2023 14:59:40 +0000 Subject: [PATCH 05/38] Clean up prints --- openpype/scripts/otio_burnin.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openpype/scripts/otio_burnin.py b/openpype/scripts/otio_burnin.py index e7c165ba0e..fa3f1e3389 100644 --- a/openpype/scripts/otio_burnin.py +++ b/openpype/scripts/otio_burnin.py @@ -641,10 +641,9 @@ def burnins_from_data( if list_to_convert: text = list_to_convert[0] cmd = convert_list_to_cmd(list_to_convert, 25.0, label=align)# need to fetch fps properly - print("cmd: " + cmd) else: text = value.format(**data) - print(text) + burnin.add_text(text, align, frame_start, frame_end, cmd=cmd) ffmpeg_args = [] From 266992f93ba45706e126358dfc47d9a18aaf015f Mon Sep 17 00:00:00 2001 From: Toke Jepsen Date: Wed, 22 Mar 2023 15:00:05 +0000 Subject: [PATCH 06/38] Update openpype/scripts/otio_burnin.py Co-authored-by: Roy Nieterau --- openpype/scripts/otio_burnin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/scripts/otio_burnin.py b/openpype/scripts/otio_burnin.py index e7c165ba0e..5e32e8d267 100644 --- a/openpype/scripts/otio_burnin.py +++ b/openpype/scripts/otio_burnin.py @@ -537,7 +537,7 @@ def burnins_from_data( if not value: continue - if isinstance(value, (dict, tuple)): + if isinstance(value, dict): raise TypeError(( "Expected string or number type." " Got: {} - \"{}\"" From 4f334a1f8061dfb8d38b176f2b8468e33df26c23 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Wed, 22 Mar 2023 15:02:31 +0000 Subject: [PATCH 07/38] Update type error message --- openpype/scripts/otio_burnin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/scripts/otio_burnin.py b/openpype/scripts/otio_burnin.py index 58727bc6b8..142ab748af 100644 --- a/openpype/scripts/otio_burnin.py +++ b/openpype/scripts/otio_burnin.py @@ -539,7 +539,7 @@ def burnins_from_data( if isinstance(value, dict): raise TypeError(( - "Expected string or number type." + "Expected string, number or list type." " Got: {} - \"{}\"" " (Make sure you have new burnin presets)." ).format(str(type(value)), str(value))) From 4f0aafe560be44bd42baff8946ff5d336bf31714 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Wed, 22 Mar 2023 15:08:32 +0000 Subject: [PATCH 08/38] Get FPS properly --- openpype/scripts/otio_burnin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openpype/scripts/otio_burnin.py b/openpype/scripts/otio_burnin.py index 142ab748af..ee29d240b2 100644 --- a/openpype/scripts/otio_burnin.py +++ b/openpype/scripts/otio_burnin.py @@ -640,7 +640,9 @@ def burnins_from_data( if list_to_convert: text = list_to_convert[0] - cmd = convert_list_to_cmd(list_to_convert, 25.0, label=align)# need to fetch fps properly + cmd = convert_list_to_cmd( + list_to_convert, data["fps"], label=align + ) else: text = value.format(**data) From a364a82b7dddf64bb8178c3e6b93ccc0565328d6 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Wed, 22 Mar 2023 15:10:02 +0000 Subject: [PATCH 09/38] Hound --- openpype/scripts/otio_burnin.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/openpype/scripts/otio_burnin.py b/openpype/scripts/otio_burnin.py index ee29d240b2..4bbb684deb 100644 --- a/openpype/scripts/otio_burnin.py +++ b/openpype/scripts/otio_burnin.py @@ -174,7 +174,13 @@ class ModifiedBurnins(ffmpeg_burnins.Burnins): self.options_init.update(options_init) def add_text( - self, text, align, frame_start=None, frame_end=None, options=None, cmd="" + self, + text, + align, + frame_start=None, + frame_end=None, + options=None, + cmd="" ): """ Adding static text to a filter. @@ -450,11 +456,13 @@ def burnins_from_data( True by default. Presets must be set separately. Should be dict with 2 keys: - - "options" - sets look of burnins - colors, opacity,...(more info: ModifiedBurnins doc) + - "options" - sets look of burnins - colors, opacity,... + (more info: ModifiedBurnins doc) - *OPTIONAL* default values are used when not included - "burnins" - contains dictionary with burnins settings - *OPTIONAL* burnins won't be added (easier is not to use this) - - each key of "burnins" represents Alignment, there are 6 possibilities: + - each key of "burnins" represents Alignment, + there are 6 possibilities: TOP_LEFT TOP_CENTERED TOP_RIGHT BOTTOM_LEFT BOTTOM_CENTERED BOTTOM_RIGHT - value must be string with text you want to burn-in From 84817a77a33d4e0236ca7cdc9e7300665f77571c Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Wed, 22 Mar 2023 15:42:45 +0000 Subject: [PATCH 10/38] Code cosmetics --- .../hosts/maya/plugins/publish/collect_review.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/collect_review.py b/openpype/hosts/maya/plugins/publish/collect_review.py index 0857e8224d..ce11e8a71f 100644 --- a/openpype/hosts/maya/plugins/publish/collect_review.py +++ b/openpype/hosts/maya/plugins/publish/collect_review.py @@ -5,6 +5,7 @@ import pyblish.api from openpype.client import get_subset_by_name from openpype.pipeline import legacy_io +from openpype.hosts.maya.api.lib import get_attribute_input class CollectReview(pyblish.api.InstancePlugin): @@ -146,19 +147,16 @@ class CollectReview(pyblish.api.InstancePlugin): ) # Collect focal length. - #Refactor to lib or use available lib method. - plug = "{0}.focalLength".format(camera) + attr = camera + ".focalLength" focal_length = None - if not cmds.listConnections(plug, destination=False, source=True): - # Static. - focal_length = cmds.getAttr(plug) - else: - # Dynamic. + if get_attribute_input(attr): start = instance.data["frameStart"] end = instance.data["frameEnd"] + 1 focal_length = [ - cmds.getAttr(plug, time=t) for t in range(int(start), int(end)) + cmds.getAttr(attr, time=t) for t in range(int(start), int(end)) ] + else: + focal_length = cmds.getAttr(attr) key = "focalLength" try: From 7ff781f3bddff9b5923789cb3406e67162c43c1a Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Wed, 22 Mar 2023 16:32:41 +0000 Subject: [PATCH 11/38] Clean up temporary files and support float truncating --- openpype/scripts/otio_burnin.py | 89 +++++++++++++++++---------------- 1 file changed, 47 insertions(+), 42 deletions(-) diff --git a/openpype/scripts/otio_burnin.py b/openpype/scripts/otio_burnin.py index 4bbb684deb..afae4f9e08 100644 --- a/openpype/scripts/otio_burnin.py +++ b/openpype/scripts/otio_burnin.py @@ -41,9 +41,8 @@ TIMECODE_KEY = "{timecode}" SOURCE_TIMECODE_KEY = "{source_timecode}" -def convert_list_to_cmd(list_to_convert, fps, label=""): +def convert_list_to_commands(list_to_convert, fps, label=""): path = None - #need to clean up temp file when done with tempfile.NamedTemporaryFile(mode="w", delete=False) as f: for i, value in enumerate(list_to_convert): seconds = i / fps @@ -63,10 +62,8 @@ def convert_list_to_cmd(list_to_convert, fps, label=""): f.write(line) f.flush() path = f.name - path = path.replace("\\", "/") - path = path.replace(":", "\\:") - return "sendcmd=f='{}'".format(path) + return path def _get_ffprobe_data(source): @@ -541,6 +538,7 @@ def burnins_from_data( if source_timecode is not None: data[SOURCE_TIMECODE_KEY[1:-1]] = SOURCE_TIMECODE_KEY + clean_up_paths = [] for align_text, value in burnin_values.items(): if not value: continue @@ -583,8 +581,48 @@ def burnins_from_data( print("Source does not have set timecode value.") value = value.replace(SOURCE_TIMECODE_KEY, MISSING_KEY_VALUE) - key_pattern = re.compile(r"(\{.*?[^{0]*\})") + # Convert lists. + cmd = "" + text = None + keys = [i[1] for i in Formatter().parse(value) if i[1] is not None] + list_to_convert = [] + # Warn about nested dictionary support for lists. Ei. we dont support + # it. + if "[" in "".join(keys): + print( + "We dont support converting nested dictionaries to lists," + " so skipping {}".format(value) + ) + else: + for key in keys: + data_value = data[key] + + # Multiple lists are not supported. + if isinstance(data_value, list) and list_to_convert: + raise ValueError( + "Found multiple lists to convert, which is not " + "supported: {}".format(value) + ) + + if isinstance(data_value, list): + print("Found list to convert: {}".format(data_value)) + for v in data_value: + data[key] = v + list_to_convert.append(value.format(**data)) + + if list_to_convert: + value = list_to_convert[0] + path = convert_list_to_commands( + list_to_convert, data["fps"], label=align + ) + cmd = "sendcmd=f='{}'".format(path) + cmd = cmd.replace("\\", "/") + cmd = cmd.replace(":", "\\:") + clean_up_paths.append(path) + + # Failsafe for missing keys. + key_pattern = re.compile(r"(\{.*?[^{0]*\})") missing_keys = [] for group in key_pattern.findall(value): try: @@ -617,42 +655,7 @@ def burnins_from_data( burnin.add_timecode(*args) continue - cmd = "" - text = None - keys = [i[1] for i in Formatter().parse(value) if i[1] is not None] - list_to_convert = [] - - # Warn about nested dictionary support for lists. Ei. we dont support - # it. - if "[" in "".join(keys): - print( - "We dont support converting nested dictionaries to lists," - " so skipping {}".format(value) - ) - else: - for key in keys: - data_value = data[key] - - # Multiple lists are not supported. - if isinstance(data_value, list) and list_to_convert: - raise ValueError( - "Found multiple lists to convert, which is not " - "supported: {}".format(value) - ) - - if isinstance(data_value, list): - print("Found list to convert: {}".format(data_value)) - for v in data_value: - data[key] = v - list_to_convert.append(value.format(**data)) - - if list_to_convert: - text = list_to_convert[0] - cmd = convert_list_to_cmd( - list_to_convert, data["fps"], label=align - ) - else: - text = value.format(**data) + text = value.format(**data) burnin.add_text(text, align, frame_start, frame_end, cmd=cmd) @@ -685,6 +688,8 @@ def burnins_from_data( burnin.render( output_path, args=ffmpeg_args_str, overwrite=overwrite, **data ) + for path in clean_up_paths: + os.remove(path) if __name__ == "__main__": From 833e48ae0f5f31e57b920950a0f5cea38a967263 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Wed, 22 Mar 2023 16:43:56 +0000 Subject: [PATCH 12/38] Docs --- website/docs/pype2/admin_presets_plugins.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/docs/pype2/admin_presets_plugins.md b/website/docs/pype2/admin_presets_plugins.md index fcdc09439b..2a30e7e8e9 100644 --- a/website/docs/pype2/admin_presets_plugins.md +++ b/website/docs/pype2/admin_presets_plugins.md @@ -293,6 +293,7 @@ If source representation has suffix **"h264"** and burnin suffix is **"client"** - It is allowed to use [Anatomy templates](admin_config#anatomy) themselves in burnins if they can be filled with available data. - Additional keys in burnins: + | Burnin key | Description | | --- | --- | | frame_start | First frame number. | @@ -303,6 +304,7 @@ If source representation has suffix **"h264"** and burnin suffix is **"client"** | resolution_height | Resolution height. | | fps | Fps of an output. | | timecode | Timecode by frame start and fps. | + | focalLength | **Only available in Maya**

Camera focal length per frame. Use syntax `{focalLength:.2f}` for decimal truncating. Eg. `35.234985` with `{focalLength:.2f}` would produce `35.23`, whereas `{focalLength:.0f}` would produce `35`. | :::warning `timecode` is specific key that can be **only at the end of content**. (`"BOTTOM_RIGHT": "TC: {timecode}"`) From 5197aa2ce7737dd15aa6941515a4fc0669edd046 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Thu, 23 Mar 2023 11:51:49 +0000 Subject: [PATCH 13/38] Suggestion to change labels. --- .../schemas/projects_schema/schemas/schema_maya_capture.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json index 1f0e4eeffb..cec4b6eb90 100644 --- a/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json +++ b/openpype/settings/entities/schemas/projects_schema/schemas/schema_maya_capture.json @@ -19,12 +19,12 @@ { "type": "text", "key": "compression", - "label": "Compression type" + "label": "Encoding" }, { "type": "text", "key": "format", - "label": "Data format" + "label": "Format" }, { "type": "number", From 52511c1e3f8924c89a100cdbe2f2d2c34923ef4f Mon Sep 17 00:00:00 2001 From: Toke Jepsen Date: Mon, 27 Mar 2023 10:07:54 +0100 Subject: [PATCH 14/38] Update openpype/scripts/otio_burnin.py Co-authored-by: Roy Nieterau --- openpype/scripts/otio_burnin.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/openpype/scripts/otio_burnin.py b/openpype/scripts/otio_burnin.py index afae4f9e08..1f151b5dc6 100644 --- a/openpype/scripts/otio_burnin.py +++ b/openpype/scripts/otio_burnin.py @@ -42,7 +42,22 @@ SOURCE_TIMECODE_KEY = "{source_timecode}" def convert_list_to_commands(list_to_convert, fps, label=""): - path = None + """Convert a list of values to a drawtext command file for ffmpeg `sendcmd` + + The list of values is expected to have a value per frame. If the video + file ends up being longer than the amount of samples per frame than the + last value will be held. + + Args: + list_to_convert (list): List of values per frame. + fps (float or int): The expected frame per seconds of the output file + label (str): Label for the + + Returns: + str: Filepath to the temporary drawtext command file. + + """ + with tempfile.NamedTemporaryFile(mode="w", delete=False) as f: for i, value in enumerate(list_to_convert): seconds = i / fps @@ -61,9 +76,7 @@ def convert_list_to_commands(list_to_convert, fps, label=""): f.write(line) f.flush() - path = f.name - - return path + return f.name def _get_ffprobe_data(source): From 28a4f09625f6dc7f9aad7c8cd6a26bfe25c4f370 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Mon, 27 Mar 2023 10:10:21 +0100 Subject: [PATCH 15/38] Finish method description --- openpype/scripts/otio_burnin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openpype/scripts/otio_burnin.py b/openpype/scripts/otio_burnin.py index 1f151b5dc6..ca0930537c 100644 --- a/openpype/scripts/otio_burnin.py +++ b/openpype/scripts/otio_burnin.py @@ -50,8 +50,9 @@ def convert_list_to_commands(list_to_convert, fps, label=""): Args: list_to_convert (list): List of values per frame. - fps (float or int): The expected frame per seconds of the output file - label (str): Label for the + fps (float or int): The expected frame per seconds of the output file. + label (str): Label for the drawtext, if specific drawtext filter is + required Returns: str: Filepath to the temporary drawtext command file. From eaca4f5551032ebea9a0790c331109ce88005290 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Mon, 27 Mar 2023 10:10:31 +0100 Subject: [PATCH 16/38] Change method name --- openpype/scripts/otio_burnin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpype/scripts/otio_burnin.py b/openpype/scripts/otio_burnin.py index ca0930537c..57a1dcfaff 100644 --- a/openpype/scripts/otio_burnin.py +++ b/openpype/scripts/otio_burnin.py @@ -41,7 +41,7 @@ TIMECODE_KEY = "{timecode}" SOURCE_TIMECODE_KEY = "{source_timecode}" -def convert_list_to_commands(list_to_convert, fps, label=""): +def convert_list_to_command(list_to_convert, fps, label=""): """Convert a list of values to a drawtext command file for ffmpeg `sendcmd` The list of values is expected to have a value per frame. If the video @@ -627,7 +627,7 @@ def burnins_from_data( if list_to_convert: value = list_to_convert[0] - path = convert_list_to_commands( + path = convert_list_to_command( list_to_convert, data["fps"], label=align ) cmd = "sendcmd=f='{}'".format(path) From 85196b68f4273518d62f83473df228487e3082d2 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Mon, 27 Mar 2023 17:06:13 +0100 Subject: [PATCH 17/38] Add maya specific burnin profile. --- .../defaults/project_settings/global.json | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/openpype/settings/defaults/project_settings/global.json b/openpype/settings/defaults/project_settings/global.json index aad17d54da..eb74078cf0 100644 --- a/openpype/settings/defaults/project_settings/global.json +++ b/openpype/settings/defaults/project_settings/global.json @@ -249,6 +249,29 @@ } } } + }, + { + "families": [], + "hosts": [ + "maya" + ], + "task_types": [], + "task_names": [], + "subsets": [], + "burnins": { + "maya_burnin": { + "TOP_LEFT": "{yy}-{mm}-{dd}", + "TOP_CENTERED": "{focalLength:.2f} mm", + "TOP_RIGHT": "{anatomy[version]}", + "BOTTOM_LEFT": "{username}", + "BOTTOM_CENTERED": "{asset}", + "BOTTOM_RIGHT": "{frame_start}-{current_frame}-{frame_end}", + "filter": { + "families": [], + "tags": [] + } + } + } } ] }, From 7264ce3aafd51c8fbd81dd1803a9242c161ad75b Mon Sep 17 00:00:00 2001 From: Toke Jepsen Date: Wed, 29 Mar 2023 09:17:20 +0100 Subject: [PATCH 18/38] Update openpype/lib/execute.py --- openpype/lib/execute.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/lib/execute.py b/openpype/lib/execute.py index 5ba62f177f..eba75389f1 100644 --- a/openpype/lib/execute.py +++ b/openpype/lib/execute.py @@ -199,7 +199,7 @@ def run_openpype_process(*args, **kwargs): # - fill more if you find more env = clean_envs_for_openpype_process(os.environ) - # Add OpenPype version if we are running from build. + # Only keep OpenPype version if we are running from build. if not is_running_from_build(): env.pop("OPENPYPE_VERSION", None) From 3fa284f16ca8ac21fef535467289e1ca3e6607ac Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 29 Mar 2023 14:09:52 +0200 Subject: [PATCH 19/38] adding size labeling to project workflow --- .github/workflows/project_actions.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/project_actions.yml b/.github/workflows/project_actions.yml index 26bc2b8a1f..dc68a9dc0e 100644 --- a/.github/workflows/project_actions.yml +++ b/.github/workflows/project_actions.yml @@ -2,7 +2,7 @@ name: project-actions on: pull_request: - types: [review_requested] + types: [opened, synchronize, assigned, review_requested] pull_request_review: types: [submitted] @@ -20,3 +20,26 @@ jobs: project_id: 11 resource_node_id: ${{ github.event.pull_request.node_id }} status_value: Change Requested + size-label: + name: pr_size_label + runs-on: ubuntu-latest + if: | + ${{(github.event_name == 'pull_request' && github.event.action == 'synchronize') + || (github.event_name == 'pull_request' && github.event.action == 'assigned')}} + + steps: + - name: Add size label + uses: "pascalgn/size-label-action@v0.4.3" + env: + GITHUB_TOKEN: "${{ secrets.YNPUT_BOT_TOKEN }}" + IGNORED: ".gitignore\n*.md\n*.json" + with: + sizes: > + { + "0": "XS", + "100": "S", + "500": "M", + "1000": "L", + "1500": "XL", + "2500": "XXL" + } \ No newline at end of file From 1e6b57209fbddefda6619b78d9d1e8d848e34c91 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 29 Mar 2023 14:47:33 +0200 Subject: [PATCH 20/38] Adding labelling to project action --- .github/pr-branch-labeler.yml | 15 +++++++++++++++ .github/pr-glob-labeler.yml | 7 +++++++ .github/workflows/project_actions.yml | 24 +++++++++++++++++++++++- 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .github/pr-branch-labeler.yml create mode 100644 .github/pr-glob-labeler.yml diff --git a/.github/pr-branch-labeler.yml b/.github/pr-branch-labeler.yml new file mode 100644 index 0000000000..bf4045442a --- /dev/null +++ b/.github/pr-branch-labeler.yml @@ -0,0 +1,15 @@ +# Apply label "feature" if head matches "feature/*" +type: feature: + head: "feature/*" + +# Apply label "feature" if head matches "feature/*" +type: enhancement: + head: "enhancement/*" + +# Apply label "bugfix" if head matches one of "bugfix/*" or "hotfix/*" +type: bugfix: + head: ["bugfix/*", "hotfix/*"] + +# Apply label "release" if base matches "release/*" +Bump Minor: + base: "release/next-minor" \ No newline at end of file diff --git a/.github/pr-glob-labeler.yml b/.github/pr-glob-labeler.yml new file mode 100644 index 0000000000..367cb16625 --- /dev/null +++ b/.github/pr-glob-labeler.yml @@ -0,0 +1,7 @@ +# Add type: unittest label if any changes in tests folders +type: unittest: +- any: ['tests/**/*', 'openpype/tests/**/*'] + +# any changes in documentation structure +type: documentation: +- any: ['website/**/*', 'docs/**/*'] \ No newline at end of file diff --git a/.github/workflows/project_actions.yml b/.github/workflows/project_actions.yml index dc68a9dc0e..dfa9bdf61f 100644 --- a/.github/workflows/project_actions.yml +++ b/.github/workflows/project_actions.yml @@ -20,6 +20,7 @@ jobs: project_id: 11 resource_node_id: ${{ github.event.pull_request.node_id }} status_value: Change Requested + size-label: name: pr_size_label runs-on: ubuntu-latest @@ -42,4 +43,25 @@ jobs: "1000": "L", "1500": "XL", "2500": "XXL" - } \ No newline at end of file + } + + label_prs_branch: + name: pr_branch_label + runs-on: ubuntu-latest + if: github.event.action == 'opened' + steps: + - name: Label PRs - Branch name detection + uses: ffittschen/pr-branch-labeler@v1 + with: + repo-token: ${{ secrets.YNPUT_BOT_TOKEN }} + + label_prs_globe: + name: pr_globe_label + runs-on: ubuntu-latest + if: github.event.action == 'opened' + steps: + - name: Label PRs - Globe detection + uses: actions/labeler@v4 + with: + repo-token: ${{ secrets.YNPUT_BOT_TOKEN }} + configuration-path: ".github/pr-glob-labeler.yml" \ No newline at end of file From 14ed02e2a9eecad85372a97bad5ec4cde7872bcb Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 29 Mar 2023 15:08:22 +0200 Subject: [PATCH 21/38] adding pr glob config for hosts --- .github/pr-glob-labeler.yml | 38 ++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/.github/pr-glob-labeler.yml b/.github/pr-glob-labeler.yml index 367cb16625..6a71b1616a 100644 --- a/.github/pr-glob-labeler.yml +++ b/.github/pr-glob-labeler.yml @@ -4,4 +4,40 @@ type: unittest: # any changes in documentation structure type: documentation: -- any: ['website/**/*', 'docs/**/*'] \ No newline at end of file +- any: ['website/**/*', 'docs/**/*'] + +# hosts triage +host: Nuke: +- openpype/hosts/nuke/**/* +host: Photoshop: +- openpype/hosts/photoshop/**/* +host: Harmony: +- openpype/hosts/harmony/**/* +host: UE: +- openpype/hosts/unreal/**/* +host: Houdini: +- openpype/hosts/houdini/**/* +host: Maya: +- openpype/hosts/maya/**/* +host: Resolve: +- openpype/hosts/resolve/**/* +host: Blender: +- openpype/hosts/blender/**/* +host: Hiero: +- openpype/hosts/hiero/**/* +host: Fusion: +- openpype/hosts/fusion/**/* +host: Flame: +- openpype/hosts/flame/**/* +host: TrayPublisher: +- openpype/hosts/traypublisher/**/* +host: 3dsmax: +- openpype/hosts/max/**/* +host: TV Paint: +- openpype/hosts/tvpaint/**/* +host: CelAction: +- openpype/hosts/celaction/**/* +host: After Effects: +- openpype/hosts/aftereffects/**/* +host: Substance Painter: +- openpype/hosts/substancepainter/**/* From e7bcf5509626d321b2f2028b293da5bdbaf24c28 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 29 Mar 2023 15:23:13 +0200 Subject: [PATCH 22/38] yaml is not supporting spaces in keys --- .github/pr-branch-labeler.yml | 8 +++--- .github/pr-glob-labeler.yml | 54 +++++++++++++++++++++++------------ 2 files changed, 39 insertions(+), 23 deletions(-) diff --git a/.github/pr-branch-labeler.yml b/.github/pr-branch-labeler.yml index bf4045442a..58bcbcb72a 100644 --- a/.github/pr-branch-labeler.yml +++ b/.github/pr-branch-labeler.yml @@ -1,15 +1,15 @@ # Apply label "feature" if head matches "feature/*" -type: feature: +'type: feature': head: "feature/*" # Apply label "feature" if head matches "feature/*" -type: enhancement: +'type: enhancement': head: "enhancement/*" # Apply label "bugfix" if head matches one of "bugfix/*" or "hotfix/*" -type: bugfix: +'type: bugfix': head: ["bugfix/*", "hotfix/*"] # Apply label "release" if base matches "release/*" -Bump Minor: +'Bump Minor': base: "release/next-minor" \ No newline at end of file diff --git a/.github/pr-glob-labeler.yml b/.github/pr-glob-labeler.yml index 6a71b1616a..0c1164f659 100644 --- a/.github/pr-glob-labeler.yml +++ b/.github/pr-glob-labeler.yml @@ -1,43 +1,59 @@ # Add type: unittest label if any changes in tests folders -type: unittest: +'type: unittest': - any: ['tests/**/*', 'openpype/tests/**/*'] # any changes in documentation structure -type: documentation: +'type: documentation': - any: ['website/**/*', 'docs/**/*'] # hosts triage -host: Nuke: +'host: Nuke': - openpype/hosts/nuke/**/* -host: Photoshop: + +'host: Photoshop': - openpype/hosts/photoshop/**/* -host: Harmony: + +'host: Harmony': - openpype/hosts/harmony/**/* -host: UE: + +'host: UE': - openpype/hosts/unreal/**/* -host: Houdini: + +'host: Houdini': - openpype/hosts/houdini/**/* -host: Maya: + +'host: Maya': - openpype/hosts/maya/**/* -host: Resolve: + +'host: Resolve': - openpype/hosts/resolve/**/* -host: Blender: + +'host: Blender': - openpype/hosts/blender/**/* -host: Hiero: + +'host: Hiero': - openpype/hosts/hiero/**/* -host: Fusion: + +'host: Fusion': - openpype/hosts/fusion/**/* -host: Flame: + +'host: Flame': - openpype/hosts/flame/**/* -host: TrayPublisher: + +'host: TrayPublisher': - openpype/hosts/traypublisher/**/* -host: 3dsmax: + +'host: 3dsmax': - openpype/hosts/max/**/* -host: TV Paint: + +'host: TV Paint': - openpype/hosts/tvpaint/**/* -host: CelAction: + +'host: CelAction': - openpype/hosts/celaction/**/* -host: After Effects: + +'host: After Effects': - openpype/hosts/aftereffects/**/* -host: Substance Painter: + +'host: Substance Painter': - openpype/hosts/substancepainter/**/* From 6b94d073a9549b097ee6075aed9c39107ec6252b Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 29 Mar 2023 15:36:32 +0200 Subject: [PATCH 23/38] updating project actions --- .github/pr-glob-labeler.yml | 10 ++++++++-- .github/workflows/project_actions.yml | 8 ++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/pr-glob-labeler.yml b/.github/pr-glob-labeler.yml index 0c1164f659..90e497fbd5 100644 --- a/.github/pr-glob-labeler.yml +++ b/.github/pr-glob-labeler.yml @@ -1,10 +1,16 @@ # Add type: unittest label if any changes in tests folders 'type: unittest': -- any: ['tests/**/*', 'openpype/tests/**/*'] +- tests/**/* +- tests/** +- openpype/tests/**/* +- openpype/tests/** # any changes in documentation structure 'type: documentation': -- any: ['website/**/*', 'docs/**/*'] +- website/**/* +- website/** +- docs/**/* +- docs/** # hosts triage 'host: Nuke': diff --git a/.github/workflows/project_actions.yml b/.github/workflows/project_actions.yml index dfa9bdf61f..ad8e8b9e13 100644 --- a/.github/workflows/project_actions.yml +++ b/.github/workflows/project_actions.yml @@ -48,7 +48,9 @@ jobs: label_prs_branch: name: pr_branch_label runs-on: ubuntu-latest - if: github.event.action == 'opened' + if: | + ${{(github.event_name == 'pull_request' && github.event.action == 'synchronize') + || (github.event_name == 'pull_request' && github.event.action == 'opened')}} steps: - name: Label PRs - Branch name detection uses: ffittschen/pr-branch-labeler@v1 @@ -58,7 +60,9 @@ jobs: label_prs_globe: name: pr_globe_label runs-on: ubuntu-latest - if: github.event.action == 'opened' + if: | + ${{(github.event_name == 'pull_request' && github.event.action == 'synchronize') + || (github.event_name == 'pull_request' && github.event.action == 'opened')}} steps: - name: Label PRs - Globe detection uses: actions/labeler@v4 From 081cd507791703b23fed0d1031f966986bad1e76 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 29 Mar 2023 16:02:25 +0200 Subject: [PATCH 24/38] updating pr globe labeler config adding modules --- .github/pr-glob-labeler.yml | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.github/pr-glob-labeler.yml b/.github/pr-glob-labeler.yml index 90e497fbd5..f990c6dfbe 100644 --- a/.github/pr-glob-labeler.yml +++ b/.github/pr-glob-labeler.yml @@ -15,51 +15,93 @@ # hosts triage 'host: Nuke': - openpype/hosts/nuke/**/* +- openpype/hosts/nuke/** 'host: Photoshop': - openpype/hosts/photoshop/**/* +- openpype/hosts/photoshop/** 'host: Harmony': - openpype/hosts/harmony/**/* +- openpype/hosts/harmony/** 'host: UE': - openpype/hosts/unreal/**/* +- openpype/hosts/unreal/** 'host: Houdini': - openpype/hosts/houdini/**/* +- openpype/hosts/houdini/** 'host: Maya': - openpype/hosts/maya/**/* +- openpype/hosts/maya/** 'host: Resolve': - openpype/hosts/resolve/**/* +- openpype/hosts/resolve/** 'host: Blender': - openpype/hosts/blender/**/* +- openpype/hosts/blender/** 'host: Hiero': - openpype/hosts/hiero/**/* +- openpype/hosts/hiero/** 'host: Fusion': - openpype/hosts/fusion/**/* +- openpype/hosts/fusion/** 'host: Flame': - openpype/hosts/flame/**/* +- openpype/hosts/flame/** 'host: TrayPublisher': - openpype/hosts/traypublisher/**/* +- openpype/hosts/traypublisher/** 'host: 3dsmax': - openpype/hosts/max/**/* +- openpype/hosts/max/** 'host: TV Paint': - openpype/hosts/tvpaint/**/* +- openpype/hosts/tvpaint/** 'host: CelAction': - openpype/hosts/celaction/**/* +- openpype/hosts/celaction/** 'host: After Effects': - openpype/hosts/aftereffects/**/* +- openpype/hosts/aftereffects/** 'host: Substance Painter': - openpype/hosts/substancepainter/**/* +- openpype/hosts/substancepainter/** + +# modules triage +'module: Deadline': +- openpype/modules/deadline/**/* +- openpype/modules/deadline/** + +'module: RoyalRender': +- openpype/modules/royalrender/**/* +- openpype/modules/royalrender/** + +'module: Sitesync': +- openpype/modules/sync_server/**/* +- openpype/modules/sync_server/** + +'module: Ftrack': +- openpype/modules/ftrack/**/* +- openpype/modules/ftrack/** + +'module: Shotgrid': +- openpype/modules/shotgrid/**/* +- openpype/modules/shotgrid/** + +'module: Kitsu': +- openpype/modules/kitsu/**/* +- openpype/modules/kitsu/** From 711089fc9cc7d0c1b9ccc6335ec67f3632042af8 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 29 Mar 2023 16:29:35 +0200 Subject: [PATCH 25/38] improving glob expressions to include settings --- .github/pr-glob-labeler.yml | 103 +++++++++++++++++------------------- 1 file changed, 49 insertions(+), 54 deletions(-) diff --git a/.github/pr-glob-labeler.yml b/.github/pr-glob-labeler.yml index f990c6dfbe..e05421f5d7 100644 --- a/.github/pr-glob-labeler.yml +++ b/.github/pr-glob-labeler.yml @@ -1,107 +1,102 @@ # Add type: unittest label if any changes in tests folders 'type: unittest': -- tests/**/* -- tests/** -- openpype/tests/**/* -- openpype/tests/** +- /**/*tests*/**/* # any changes in documentation structure 'type: documentation': -- website/**/* -- website/** -- docs/**/* -- docs/** +- /**/*website*/**/* +- /**/*docs*/**/* # hosts triage 'host: Nuke': -- openpype/hosts/nuke/**/* -- openpype/hosts/nuke/** +- /**/*nuke* +- /**/*nuke*/**/* 'host: Photoshop': -- openpype/hosts/photoshop/**/* -- openpype/hosts/photoshop/** +- /**/*photoshop* +- /**/*photoshop*/**/* 'host: Harmony': -- openpype/hosts/harmony/**/* -- openpype/hosts/harmony/** +- /**/*harmony* +- /**/*harmony*/**/* 'host: UE': -- openpype/hosts/unreal/**/* -- openpype/hosts/unreal/** +- /**/*unreal* +- /**/*unreal*/**/* 'host: Houdini': -- openpype/hosts/houdini/**/* -- openpype/hosts/houdini/** +- /**/*houdini* +- /**/*houdini*/**/* 'host: Maya': -- openpype/hosts/maya/**/* -- openpype/hosts/maya/** +- /**/*maya* +- /**/*maya*/**/* 'host: Resolve': -- openpype/hosts/resolve/**/* -- openpype/hosts/resolve/** +- /**/*resolve* +- /**/*resolve*/**/* 'host: Blender': -- openpype/hosts/blender/**/* -- openpype/hosts/blender/** +- /**/*blender* +- /**/*blender*/**/* 'host: Hiero': -- openpype/hosts/hiero/**/* -- openpype/hosts/hiero/** +- /**/*hiero* +- /**/*hiero*/**/* 'host: Fusion': -- openpype/hosts/fusion/**/* -- openpype/hosts/fusion/** +- /**/*fusion* +- /**/*fusion*/**/* 'host: Flame': -- openpype/hosts/flame/**/* -- openpype/hosts/flame/** +- /**/*flame* +- /**/*flame*/**/* 'host: TrayPublisher': -- openpype/hosts/traypublisher/**/* -- openpype/hosts/traypublisher/** +- /**/*traypublisher* +- /**/*traypublisher*/**/* 'host: 3dsmax': -- openpype/hosts/max/**/* -- openpype/hosts/max/** +- /**/*max* +- /**/*max*/**/* 'host: TV Paint': -- openpype/hosts/tvpaint/**/* -- openpype/hosts/tvpaint/** +- /**/*tvpaint* +- /**/*tvpaint*/**/* 'host: CelAction': -- openpype/hosts/celaction/**/* -- openpype/hosts/celaction/** +- /**/*celaction* +- /**/*celaction*/**/* 'host: After Effects': -- openpype/hosts/aftereffects/**/* -- openpype/hosts/aftereffects/** +- /**/*aftereffects* +- /**/*aftereffects*/**/* 'host: Substance Painter': -- openpype/hosts/substancepainter/**/* -- openpype/hosts/substancepainter/** +- /**/*substancepainter* +- /**/*substancepainter*/**/* # modules triage 'module: Deadline': -- openpype/modules/deadline/**/* -- openpype/modules/deadline/** +- /**/*deadline* +- /**/*deadline*/**/* 'module: RoyalRender': -- openpype/modules/royalrender/**/* -- openpype/modules/royalrender/** +- /**/*royalrender* +- /**/*royalrender*/**/* 'module: Sitesync': -- openpype/modules/sync_server/**/* -- openpype/modules/sync_server/** +- /**/*sync_server* +- /**/*sync_server*/**/* 'module: Ftrack': -- openpype/modules/ftrack/**/* -- openpype/modules/ftrack/** +- /**/*ftrack* +- /**/*ftrack*/**/* 'module: Shotgrid': -- openpype/modules/shotgrid/**/* -- openpype/modules/shotgrid/** +- /**/*shotgrid* +- /**/*shotgrid*/**/* 'module: Kitsu': -- openpype/modules/kitsu/**/* -- openpype/modules/kitsu/** +- /**/*kitsu* +- /**/*kitsu*/**/* From 14cfe2b9938998a91e15a12cb5bb8092b567405d Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 29 Mar 2023 17:12:41 +0200 Subject: [PATCH 26/38] project action with pr target trigger --- .github/workflows/project_actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/project_actions.yml b/.github/workflows/project_actions.yml index ad8e8b9e13..4fc32d9986 100644 --- a/.github/workflows/project_actions.yml +++ b/.github/workflows/project_actions.yml @@ -1,7 +1,7 @@ name: project-actions on: - pull_request: + pull_request_target: types: [opened, synchronize, assigned, review_requested] pull_request_review: types: [submitted] From 5ccc8cd745c0c0cc83480eed4ee835b3f82f757e Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 29 Mar 2023 17:30:38 +0200 Subject: [PATCH 27/38] fixing target to include pull_request also fix globes --- .github/pr-glob-labeler.yml | 98 +++++++++++++-------------- .github/workflows/project_actions.yml | 1 + 2 files changed, 50 insertions(+), 49 deletions(-) diff --git a/.github/pr-glob-labeler.yml b/.github/pr-glob-labeler.yml index e05421f5d7..f23f74f310 100644 --- a/.github/pr-glob-labeler.yml +++ b/.github/pr-glob-labeler.yml @@ -1,102 +1,102 @@ # Add type: unittest label if any changes in tests folders 'type: unittest': -- /**/*tests*/**/* +- **/*tests*/**/* # any changes in documentation structure 'type: documentation': -- /**/*website*/**/* -- /**/*docs*/**/* +- **/*website*/**/* +- **/*docs*/**/* # hosts triage 'host: Nuke': -- /**/*nuke* -- /**/*nuke*/**/* +- **/*nuke* +- **/*nuke*/**/* 'host: Photoshop': -- /**/*photoshop* -- /**/*photoshop*/**/* +- **/*photoshop* +- **/*photoshop*/**/* 'host: Harmony': -- /**/*harmony* -- /**/*harmony*/**/* +- **/*harmony* +- **/*harmony*/**/* 'host: UE': -- /**/*unreal* -- /**/*unreal*/**/* +- **/*unreal* +- **/*unreal*/**/* 'host: Houdini': -- /**/*houdini* -- /**/*houdini*/**/* +- **/*houdini* +- **/*houdini*/**/* 'host: Maya': -- /**/*maya* -- /**/*maya*/**/* +- **/*maya* +- **/*maya*/**/* 'host: Resolve': -- /**/*resolve* -- /**/*resolve*/**/* +- **/*resolve* +- **/*resolve*/**/* 'host: Blender': -- /**/*blender* -- /**/*blender*/**/* +- **/*blender* +- **/*blender*/**/* 'host: Hiero': -- /**/*hiero* -- /**/*hiero*/**/* +- **/*hiero* +- **/*hiero*/**/* 'host: Fusion': -- /**/*fusion* -- /**/*fusion*/**/* +- **/*fusion* +- **/*fusion*/**/* 'host: Flame': -- /**/*flame* -- /**/*flame*/**/* +- **/*flame* +- **/*flame*/**/* 'host: TrayPublisher': -- /**/*traypublisher* -- /**/*traypublisher*/**/* +- **/*traypublisher* +- **/*traypublisher*/**/* 'host: 3dsmax': -- /**/*max* -- /**/*max*/**/* +- **/*max* +- **/*max*/**/* 'host: TV Paint': -- /**/*tvpaint* -- /**/*tvpaint*/**/* +- **/*tvpaint* +- **/*tvpaint*/**/* 'host: CelAction': -- /**/*celaction* -- /**/*celaction*/**/* +- **/*celaction* +- **/*celaction*/**/* 'host: After Effects': -- /**/*aftereffects* -- /**/*aftereffects*/**/* +- **/*aftereffects* +- **/*aftereffects*/**/* 'host: Substance Painter': -- /**/*substancepainter* -- /**/*substancepainter*/**/* +- **/*substancepainter* +- **/*substancepainter*/**/* # modules triage 'module: Deadline': -- /**/*deadline* -- /**/*deadline*/**/* +- **/*deadline* +- **/*deadline*/**/* 'module: RoyalRender': -- /**/*royalrender* -- /**/*royalrender*/**/* +- **/*royalrender* +- **/*royalrender*/**/* 'module: Sitesync': -- /**/*sync_server* -- /**/*sync_server*/**/* +- **/*sync_server* +- **/*sync_server*/**/* 'module: Ftrack': -- /**/*ftrack* -- /**/*ftrack*/**/* +- **/*ftrack* +- **/*ftrack*/**/* 'module: Shotgrid': -- /**/*shotgrid* -- /**/*shotgrid*/**/* +- **/*shotgrid* +- **/*shotgrid*/**/* 'module: Kitsu': -- /**/*kitsu* -- /**/*kitsu*/**/* +- **/*kitsu* +- **/*kitsu*/**/* diff --git a/.github/workflows/project_actions.yml b/.github/workflows/project_actions.yml index 4fc32d9986..605a0ae422 100644 --- a/.github/workflows/project_actions.yml +++ b/.github/workflows/project_actions.yml @@ -2,6 +2,7 @@ name: project-actions on: pull_request_target: + pull_request: types: [opened, synchronize, assigned, review_requested] pull_request_review: types: [submitted] From fb1d4ea5b1e401cd7ab3b320dfcab14dd5fdc665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Je=C5=BEek?= Date: Wed, 29 Mar 2023 17:35:48 +0200 Subject: [PATCH 28/38] removing pr target --- .github/workflows/project_actions.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/project_actions.yml b/.github/workflows/project_actions.yml index 605a0ae422..c66e378a5a 100644 --- a/.github/workflows/project_actions.yml +++ b/.github/workflows/project_actions.yml @@ -1,7 +1,6 @@ name: project-actions on: - pull_request_target: pull_request: types: [opened, synchronize, assigned, review_requested] pull_request_review: @@ -69,4 +68,4 @@ jobs: uses: actions/labeler@v4 with: repo-token: ${{ secrets.YNPUT_BOT_TOKEN }} - configuration-path: ".github/pr-glob-labeler.yml" \ No newline at end of file + configuration-path: ".github/pr-glob-labeler.yml" From 911c089319b7b90fc6e5726555d9fc9aa5d21a80 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Wed, 29 Mar 2023 17:54:17 +0200 Subject: [PATCH 29/38] Fix collect current file - Fix families filtering - Remove unused import - Fix correct detection if scene is new but unsaved scene --- .../hosts/houdini/plugins/publish/collect_current_file.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/houdini/plugins/publish/collect_current_file.py b/openpype/hosts/houdini/plugins/publish/collect_current_file.py index 9cca07fdc7..caf679f98b 100644 --- a/openpype/hosts/houdini/plugins/publish/collect_current_file.py +++ b/openpype/hosts/houdini/plugins/publish/collect_current_file.py @@ -1,7 +1,6 @@ import os import hou -from openpype.pipeline import legacy_io import pyblish.api @@ -11,7 +10,7 @@ class CollectHoudiniCurrentFile(pyblish.api.InstancePlugin): order = pyblish.api.CollectorOrder - 0.01 label = "Houdini Current File" hosts = ["houdini"] - family = ["workfile"] + families = ["workfile"] def process(self, instance): """Inject the current working file""" @@ -21,7 +20,7 @@ class CollectHoudiniCurrentFile(pyblish.api.InstancePlugin): # By default, Houdini will even point a new scene to a path. # However if the file is not saved at all and does not exist, # we assume the user never set it. - filepath = "" + current_file = "" elif os.path.basename(current_file) == "untitled.hip": # Due to even a new file being called 'untitled.hip' we are unable From 6e04f620d949d80e20c315694cead3c0dc71d913 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 29 Mar 2023 22:06:14 +0200 Subject: [PATCH 30/38] project action fix glob path --- .github/pr-glob-labeler.yml | 98 ++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/.github/pr-glob-labeler.yml b/.github/pr-glob-labeler.yml index f23f74f310..69df5ace75 100644 --- a/.github/pr-glob-labeler.yml +++ b/.github/pr-glob-labeler.yml @@ -1,102 +1,102 @@ # Add type: unittest label if any changes in tests folders 'type: unittest': -- **/*tests*/**/* +- ./**/*tests*/**/* # any changes in documentation structure 'type: documentation': -- **/*website*/**/* -- **/*docs*/**/* +- /**/*website*/**/* +- /**/*docs*/**/* # hosts triage 'host: Nuke': -- **/*nuke* -- **/*nuke*/**/* +- /**/*nuke* +- ./**/*nuke*/**/* 'host: Photoshop': -- **/*photoshop* -- **/*photoshop*/**/* +- ./**/*photoshop* +- ./**/*photoshop*/**/* 'host: Harmony': -- **/*harmony* -- **/*harmony*/**/* +- ./**/*harmony* +- ./**/*harmony*/**/* 'host: UE': -- **/*unreal* -- **/*unreal*/**/* +- ./**/*unreal* +- ./**/*unreal*/**/* 'host: Houdini': -- **/*houdini* -- **/*houdini*/**/* +- ./**/*houdini* +- ./**/*houdini*/**/* 'host: Maya': -- **/*maya* -- **/*maya*/**/* +- ./**/*maya* +- ./**/*maya*/**/* 'host: Resolve': -- **/*resolve* -- **/*resolve*/**/* +- ./**/*resolve* +- ./**/*resolve*/**/* 'host: Blender': -- **/*blender* -- **/*blender*/**/* +- ./**/*blender* +- ./**/*blender*/**/* 'host: Hiero': -- **/*hiero* -- **/*hiero*/**/* +- ./**/*hiero* +- ./**/*hiero*/**/* 'host: Fusion': -- **/*fusion* -- **/*fusion*/**/* +- ./**/*fusion* +- ./**/*fusion*/**/* 'host: Flame': -- **/*flame* -- **/*flame*/**/* +- ./**/*flame* +- ./**/*flame*/**/* 'host: TrayPublisher': -- **/*traypublisher* -- **/*traypublisher*/**/* +- ./**/*traypublisher* +- ./**/*traypublisher*/**/* 'host: 3dsmax': -- **/*max* -- **/*max*/**/* +- ./**/*max* +- ./**/*max*/**/* 'host: TV Paint': -- **/*tvpaint* -- **/*tvpaint*/**/* +- ./**/*tvpaint* +- ./**/*tvpaint*/**/* 'host: CelAction': -- **/*celaction* -- **/*celaction*/**/* +- ./**/*celaction* +- ./**/*celaction*/**/* 'host: After Effects': -- **/*aftereffects* -- **/*aftereffects*/**/* +- ./**/*aftereffects* +- ./**/*aftereffects*/**/* 'host: Substance Painter': -- **/*substancepainter* -- **/*substancepainter*/**/* +- ./**/*substancepainter* +- ./**/*substancepainter*/**/* # modules triage 'module: Deadline': -- **/*deadline* -- **/*deadline*/**/* +- ./**/*deadline* +- ./**/*deadline*/**/* 'module: RoyalRender': -- **/*royalrender* -- **/*royalrender*/**/* +- ./**/*royalrender* +- ./**/*royalrender*/**/* 'module: Sitesync': -- **/*sync_server* -- **/*sync_server*/**/* +- ./**/*sync_server* +- ./**/*sync_server*/**/* 'module: Ftrack': -- **/*ftrack* -- **/*ftrack*/**/* +- ./**/*ftrack* +- ./**/*ftrack*/**/* 'module: Shotgrid': -- **/*shotgrid* -- **/*shotgrid*/**/* +- ./**/*shotgrid* +- ./**/*shotgrid*/**/* 'module: Kitsu': -- **/*kitsu* -- **/*kitsu*/**/* +- ./**/*kitsu* +- ./**/*kitsu*/**/* From 9dd6b3bbe225065d66d0d77afa71ef2db2460b14 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 29 Mar 2023 22:11:42 +0200 Subject: [PATCH 31/38] fix the glob expression --- .github/pr-glob-labeler.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/pr-glob-labeler.yml b/.github/pr-glob-labeler.yml index 69df5ace75..f5eae1067e 100644 --- a/.github/pr-glob-labeler.yml +++ b/.github/pr-glob-labeler.yml @@ -1,15 +1,16 @@ # Add type: unittest label if any changes in tests folders 'type: unittest': -- ./**/*tests*/**/* +- /tests/**/* +- openpype/tests/**/* # any changes in documentation structure 'type: documentation': -- /**/*website*/**/* -- /**/*docs*/**/* +- '*/**/*website*/**/*' +- '*/**/*docs*/**/*' # hosts triage 'host: Nuke': -- /**/*nuke* +- ./**/*nuke* - ./**/*nuke*/**/* 'host: Photoshop': From 07f09b0fd691f59db61dea7dd125777c4a18ad90 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 29 Mar 2023 22:15:35 +0200 Subject: [PATCH 32/38] glob final fix of expressions with yaml compatibilty --- .github/pr-glob-labeler.yml | 95 ++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 48 deletions(-) diff --git a/.github/pr-glob-labeler.yml b/.github/pr-glob-labeler.yml index f5eae1067e..286e7768b5 100644 --- a/.github/pr-glob-labeler.yml +++ b/.github/pr-glob-labeler.yml @@ -1,7 +1,6 @@ # Add type: unittest label if any changes in tests folders 'type: unittest': -- /tests/**/* -- openpype/tests/**/* +- '*/*tests*/**/*' # any changes in documentation structure 'type: documentation': @@ -10,94 +9,94 @@ # hosts triage 'host: Nuke': -- ./**/*nuke* -- ./**/*nuke*/**/* +- '*/**/*nuke*' +- '*/**/*nuke*/**/*' 'host: Photoshop': -- ./**/*photoshop* -- ./**/*photoshop*/**/* +- '*/**/*photoshop*' +- '*/**/*photoshop*/**/*' 'host: Harmony': -- ./**/*harmony* -- ./**/*harmony*/**/* +- '*/**/*harmony*' +- '*/**/*harmony*/**/*' 'host: UE': -- ./**/*unreal* -- ./**/*unreal*/**/* +- '*/**/*unreal*' +- '*/**/*unreal*/**/*' 'host: Houdini': -- ./**/*houdini* -- ./**/*houdini*/**/* +- '*/**/*houdini*' +- '*/**/*houdini*/**/*' 'host: Maya': -- ./**/*maya* -- ./**/*maya*/**/* +- '*/**/*maya*' +- '*/**/*maya*/**/*' 'host: Resolve': -- ./**/*resolve* -- ./**/*resolve*/**/* +- '*/**/*resolve*' +- '*/**/*resolve*/**/*' 'host: Blender': -- ./**/*blender* -- ./**/*blender*/**/* +- '*/**/*blender*' +- '*/**/*blender*/**/*' 'host: Hiero': -- ./**/*hiero* -- ./**/*hiero*/**/* +- '*/**/*hiero*' +- '*/**/*hiero*/**/*' 'host: Fusion': -- ./**/*fusion* -- ./**/*fusion*/**/* +- '*/**/*fusion*' +- '*/**/*fusion*/**/*' 'host: Flame': -- ./**/*flame* -- ./**/*flame*/**/* +- '*/**/*flame*' +- '*/**/*flame*/**/*' 'host: TrayPublisher': -- ./**/*traypublisher* -- ./**/*traypublisher*/**/* +- '*/**/*traypublisher*' +- '*/**/*traypublisher*/**/*' 'host: 3dsmax': -- ./**/*max* -- ./**/*max*/**/* +- '*/**/*max*' +- '*/**/*max*/**/*' 'host: TV Paint': -- ./**/*tvpaint* -- ./**/*tvpaint*/**/* +- '*/**/*tvpaint*' +- '*/**/*tvpaint*/**/*' 'host: CelAction': -- ./**/*celaction* -- ./**/*celaction*/**/* +- '*/**/*celaction*' +- '*/**/*celaction*/**/*' 'host: After Effects': -- ./**/*aftereffects* -- ./**/*aftereffects*/**/* +- '*/**/*aftereffects*' +- '*/**/*aftereffects*/**/*' 'host: Substance Painter': -- ./**/*substancepainter* -- ./**/*substancepainter*/**/* +- '*/**/*substancepainter*' +- '*/**/*substancepainter*/**/*' # modules triage 'module: Deadline': -- ./**/*deadline* -- ./**/*deadline*/**/* +- '*/**/*deadline*' +- '*/**/*deadline*/**/*' 'module: RoyalRender': -- ./**/*royalrender* -- ./**/*royalrender*/**/* +- '*/**/*royalrender*' +- '*/**/*royalrender*/**/*' 'module: Sitesync': -- ./**/*sync_server* -- ./**/*sync_server*/**/* +- '*/**/*sync_server*' +- '*/**/*sync_server*/**/*' 'module: Ftrack': -- ./**/*ftrack* -- ./**/*ftrack*/**/* +- '*/**/*ftrack*' +- '*/**/*ftrack*/**/*' 'module: Shotgrid': -- ./**/*shotgrid* -- ./**/*shotgrid*/**/* +- '*/**/*shotgrid*' +- '*/**/*shotgrid*/**/*' 'module: Kitsu': -- ./**/*kitsu* -- ./**/*kitsu*/**/* +- '*/**/*kitsu*' +- '*/**/*kitsu*/**/*' From 9a2ef0738f1c26a9abbe5d64fa46a8584173f568 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 29 Mar 2023 22:19:42 +0200 Subject: [PATCH 33/38] bug label rather then bugfix --- .github/pr-branch-labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pr-branch-labeler.yml b/.github/pr-branch-labeler.yml index 58bcbcb72a..ca82051006 100644 --- a/.github/pr-branch-labeler.yml +++ b/.github/pr-branch-labeler.yml @@ -7,7 +7,7 @@ head: "enhancement/*" # Apply label "bugfix" if head matches one of "bugfix/*" or "hotfix/*" -'type: bugfix': +'type: bug': head: ["bugfix/*", "hotfix/*"] # Apply label "release" if base matches "release/*" From 2b540f1b2e0b6fbd9642d50bc4a81c94b3e58a89 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 29 Mar 2023 22:26:59 +0200 Subject: [PATCH 34/38] project action trigger to target pr --- .github/workflows/project_actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/project_actions.yml b/.github/workflows/project_actions.yml index c66e378a5a..769f40e0b8 100644 --- a/.github/workflows/project_actions.yml +++ b/.github/workflows/project_actions.yml @@ -1,7 +1,7 @@ name: project-actions on: - pull_request: + pull_request_target: types: [opened, synchronize, assigned, review_requested] pull_request_review: types: [submitted] From 4ee44bcfec4b06f2ba95881261de7a79b0ae99a1 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 30 Mar 2023 09:15:48 +0200 Subject: [PATCH 35/38] update project action workflow --- .github/workflows/project_actions.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/project_actions.yml b/.github/workflows/project_actions.yml index 769f40e0b8..4c09549ac4 100644 --- a/.github/workflows/project_actions.yml +++ b/.github/workflows/project_actions.yml @@ -69,3 +69,4 @@ jobs: with: repo-token: ${{ secrets.YNPUT_BOT_TOKEN }} configuration-path: ".github/pr-glob-labeler.yml" + sync-labels: false From b752035022dd21abdf192a74084aefd6dfcf276f Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 30 Mar 2023 09:19:05 +0200 Subject: [PATCH 36/38] project actions sync labels true --- .github/workflows/project_actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/project_actions.yml b/.github/workflows/project_actions.yml index 4c09549ac4..8080d68156 100644 --- a/.github/workflows/project_actions.yml +++ b/.github/workflows/project_actions.yml @@ -69,4 +69,4 @@ jobs: with: repo-token: ${{ secrets.YNPUT_BOT_TOKEN }} configuration-path: ".github/pr-glob-labeler.yml" - sync-labels: false + sync-labels: true From c3e4bc6409a91d88a481dffa98ecc9ff1454e32a Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 30 Mar 2023 09:29:55 +0200 Subject: [PATCH 37/38] project actions sync labels off update labeler --- .github/workflows/project_actions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/project_actions.yml b/.github/workflows/project_actions.yml index 8080d68156..cfee140541 100644 --- a/.github/workflows/project_actions.yml +++ b/.github/workflows/project_actions.yml @@ -65,8 +65,8 @@ jobs: || (github.event_name == 'pull_request' && github.event.action == 'opened')}} steps: - name: Label PRs - Globe detection - uses: actions/labeler@v4 + uses: actions/labeler@v4.0.3 with: repo-token: ${{ secrets.YNPUT_BOT_TOKEN }} configuration-path: ".github/pr-glob-labeler.yml" - sync-labels: true + sync-labels: false From ea2490ce5618f556d8374e488364cabefea51a7a Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 30 Mar 2023 13:37:52 +0200 Subject: [PATCH 38/38] project action - reducing job triggering --- .github/workflows/project_actions.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/project_actions.yml b/.github/workflows/project_actions.yml index cfee140541..1e1a1441f7 100644 --- a/.github/workflows/project_actions.yml +++ b/.github/workflows/project_actions.yml @@ -25,8 +25,8 @@ jobs: name: pr_size_label runs-on: ubuntu-latest if: | - ${{(github.event_name == 'pull_request' && github.event.action == 'synchronize') - || (github.event_name == 'pull_request' && github.event.action == 'assigned')}} + ${{(github.event_name == 'pull_request' && github.event.action == 'assigned') + || (github.event_name == 'pull_request' && github.event.action == 'opened')}} steps: - name: Add size label @@ -49,7 +49,7 @@ jobs: name: pr_branch_label runs-on: ubuntu-latest if: | - ${{(github.event_name == 'pull_request' && github.event.action == 'synchronize') + ${{(github.event_name == 'pull_request' && github.event.action == 'assigned') || (github.event_name == 'pull_request' && github.event.action == 'opened')}} steps: - name: Label PRs - Branch name detection @@ -61,7 +61,7 @@ jobs: name: pr_globe_label runs-on: ubuntu-latest if: | - ${{(github.event_name == 'pull_request' && github.event.action == 'synchronize') + ${{(github.event_name == 'pull_request' && github.event.action == 'assigned') || (github.event_name == 'pull_request' && github.event.action == 'opened')}} steps: - name: Label PRs - Globe detection