From 26d312f0f2a0e3ee64c7b0431757deae9d70f061 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Mon, 30 Sep 2024 13:35:36 +0200 Subject: [PATCH 01/15] added release trigger action --- .github/workflows/release_trigger.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/release_trigger.yml diff --git a/.github/workflows/release_trigger.yml b/.github/workflows/release_trigger.yml new file mode 100644 index 0000000..01a3b3a --- /dev/null +++ b/.github/workflows/release_trigger.yml @@ -0,0 +1,12 @@ +name: 🚀 Release Trigger + +on: + workflow_dispatch: + +jobs: + call-release-trigger: + uses: ynput/ops-repo-automation/.github/workflows/release_trigger.yml@main + secrets: + token: ${{ secrets.YNPUT_BOT_TOKEN }} + email: ${{ secrets.CI_EMAIL }} + user: ${{ secrets.CI_USER }} From 5a02914d01c668b003049a2ba27f00523788affd Mon Sep 17 00:00:00 2001 From: Ynbot Date: Wed, 2 Oct 2024 08:32:15 +0000 Subject: [PATCH 02/15] [Automated] Add generated package files from main --- client/ayon_photoshop/version.py | 2 +- package.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/ayon_photoshop/version.py b/client/ayon_photoshop/version.py index 5382a23..a3e317d 100644 --- a/client/ayon_photoshop/version.py +++ b/client/ayon_photoshop/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- """Package declaring AYON addon 'photoshop' version.""" -__version__ = "0.2.3-dev.1" +__version__ = "0.2.3" diff --git a/package.py b/package.py index 17c0cd6..847366d 100644 --- a/package.py +++ b/package.py @@ -1,6 +1,6 @@ name = "photoshop" title = "Photoshop" -version = "0.2.3-dev.1" +version = "0.2.3" client_dir = "ayon_photoshop" From 42fcf1a3dc2b587e968db7189c3ccc8cca7b332e Mon Sep 17 00:00:00 2001 From: Ynbot Date: Wed, 2 Oct 2024 08:32:56 +0000 Subject: [PATCH 03/15] [Automated] Update version in package.py for develop --- client/ayon_photoshop/version.py | 2 +- package.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/ayon_photoshop/version.py b/client/ayon_photoshop/version.py index a3e317d..573c14b 100644 --- a/client/ayon_photoshop/version.py +++ b/client/ayon_photoshop/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- """Package declaring AYON addon 'photoshop' version.""" -__version__ = "0.2.3" +__version__ = "0.2.3+dev" diff --git a/package.py b/package.py index 847366d..fdb6c14 100644 --- a/package.py +++ b/package.py @@ -1,6 +1,6 @@ name = "photoshop" title = "Photoshop" -version = "0.2.3" +version = "0.2.3+dev" client_dir = "ayon_photoshop" From 4a28c196ee782a392b0718686068fd7d4ae452ba Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Wed, 16 Oct 2024 10:58:39 +0200 Subject: [PATCH 04/15] define app host name --- package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.py b/package.py index fdb6c14..88ebbc8 100644 --- a/package.py +++ b/package.py @@ -1,9 +1,10 @@ name = "photoshop" title = "Photoshop" version = "0.2.3+dev" - +app_host_name = "photoshop" client_dir = "ayon_photoshop" +ayon_server_version = ">=1.1.2" ayon_required_addons = { "core": ">0.3.2", } From da388758cfaebfdbb244830bc87fb0fc375e0698 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Fri, 25 Oct 2024 16:10:04 +0200 Subject: [PATCH 05/15] update release trigger action --- .github/workflows/release_trigger.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/release_trigger.yml b/.github/workflows/release_trigger.yml index 01a3b3a..4293e4a 100644 --- a/.github/workflows/release_trigger.yml +++ b/.github/workflows/release_trigger.yml @@ -2,10 +2,23 @@ name: 🚀 Release Trigger on: workflow_dispatch: + inputs: + draft: + type: boolean + description: "Create Release Draft" + required: false + default: false + release_overwrite: + type: string + description: "Set Version Release Tag" + required: false jobs: call-release-trigger: uses: ynput/ops-repo-automation/.github/workflows/release_trigger.yml@main + with: + draft: ${{ inputs.draft }} + release_overwrite: ${{ inputs.release_overwrite }} secrets: token: ${{ secrets.YNPUT_BOT_TOKEN }} email: ${{ secrets.CI_EMAIL }} From 8f5bb72f4c2d7b8eb48ed48fbab8c1e5e794a3dd Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Mon, 4 Nov 2024 15:04:09 +0100 Subject: [PATCH 06/15] added upload to ynput cloud action --- .github/workflows/upload_to_ynput_cloud.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/upload_to_ynput_cloud.yml diff --git a/.github/workflows/upload_to_ynput_cloud.yml b/.github/workflows/upload_to_ynput_cloud.yml new file mode 100644 index 0000000..7745a8e --- /dev/null +++ b/.github/workflows/upload_to_ynput_cloud.yml @@ -0,0 +1,16 @@ +name: 📤 Upload to Ynput Cloud + +on: + workflow_dispatch: + release: + types: [published] + +jobs: + call-upload-to-ynput-cloud: + uses: ynput/ops-repo-automation/.github/workflows/upload_to_ynput_cloud.yml@main + secrets: + CI_EMAIL: ${{ secrets.CI_EMAIL }} + CI_USER: ${{ secrets.CI_USER }} + YNPUT_BOT_TOKEN: ${{ secrets.YNPUT_BOT_TOKEN }} + YNPUT_CLOUD_URL: ${{ secrets.YNPUT_CLOUD_URL }} + YNPUT_CLOUD_TOKEN: ${{ secrets.YNPUT_CLOUD_TOKEN }} From 32f1a78cf64b7317e1d01dfcfa973e9bb3f29bf9 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Thu, 14 Nov 2024 12:21:01 +0100 Subject: [PATCH 07/15] Updated README.md --- client/ayon_photoshop/api/README.md | 213 ++-------------------------- 1 file changed, 8 insertions(+), 205 deletions(-) diff --git a/client/ayon_photoshop/api/README.md b/client/ayon_photoshop/api/README.md index ef458de..488a374 100644 --- a/client/ayon_photoshop/api/README.md +++ b/client/ayon_photoshop/api/README.md @@ -6,21 +6,20 @@ The Photoshop integration requires two components to work; `extension` and `serv ### Extension -To install the extension download [Extension Manager Command Line tool (ExManCmd)](https://github.com/Adobe-CEP/Getting-Started-guides/tree/master/Package%20Distribute%20Install#option-2---exmancmd). +There need to be done several setup steps first before running the AYON integration. First your active project need to have Photoshop (PS) defined in the project anatomy as an available tool including its filepath to the executable (being set by default). Secondly its neccessary to install PS extension manager which simplifies future extensions installation / management for PS. We skip the first step due to the fact it should be already preset by TD / Admin. And we jump to the second step instead right away. + +To install the extension manager , open the following link and download it first Anastasyi's Extension Manager. Open Anastasyi's Extension Manager and select Photoshop in the menu. Then go to {path to PS addon}hosts/photoshop/api/extension.zxp. Current location will be most likely in /User/AppData, on WINDOWS it would be something like c:\Users\YOUR_USER\AppData\Local\Ynput\AYON\addons\core_xx.xx.xx\ayon_core\hosts\photoshop\api. On Linux look in ~/.local/share/Ynput/AYON/addons, on Mac ~/Library/Application Support/Ynput/AYON/addons -``` -ExManCmd /install {path to addon}/api/extension.zxp -``` ### Server The easiest way to get the server and Photoshop launch is with: ``` -python -c ^"import ayon_photoshop;ayon_photoshop.launch(""C:\Program Files\Adobe\Adobe Photoshop 2020\Photoshop.exe"")^" +python -c ^"import ayon_photoshop;ayon_photoshop.launch(""C:\Program Files\Adobe\Adobe Photoshop 2024\Photoshop.exe"")^" ``` -`avalon.photoshop.launch` launches the application and server, and also closes the server when Photoshop exists. +`ayon_photoshop.launch` launches the application and server, and also closes the server when Photoshop exists. ## Usage @@ -38,218 +37,22 @@ When signing the extension you can use this [guide](https://github.com/Adobe-CEP ``` ZXPSignCmd -selfSignedCert NA NA Ayon Ayon-Photoshop Ayon extension.p12 -ZXPSignCmd -sign {path to avalon-core}\avalon\photoshop\extension {path to avalon-core}\avalon\photoshop\extension.zxp extension.p12 avalon +ZXPSignCmd -sign {path to ayon-photoshop}\client\ayon-photoshop\api\extension {path to ayon-photoshop}\client\ayon-photoshop\api\extension.zxp extension.p12 ayon ``` ### Plugin Examples These plugins were made with the [polly config](https://github.com/mindbender-studio/config). To fully integrate and load, you will have to use this config and add `image` to the [integration plugin](https://github.com/mindbender-studio/config/blob/master/polly/plugins/publish/integrate_asset.py). -#### Creator Plugin -```python -from avalon import photoshop - - -class CreateImage(photoshop.Creator): - """Image folder for publish.""" - - name = "imageDefault" - label = "Image" - product_type = "image" - - def __init__(self, *args, **kwargs): - super(CreateImage, self).__init__(*args, **kwargs) -``` - -#### Collector Plugin -```python -import pythoncom - -import pyblish.api - - -class CollectInstances(pyblish.api.ContextPlugin): - """Gather instances by LayerSet and file metadata - - This collector takes into account assets that are associated with - an LayerSet and marked with a unique identifier; - - Identifier: - id (str): "ayon.create.instance" - """ - - label = "Instances" - order = pyblish.api.CollectorOrder - hosts = ["photoshop"] - families_mapping = { - "image": [] - } - - def process(self, context): - # Necessary call when running in a different thread which pyblish-qml - # can be. - pythoncom.CoInitialize() - - photoshop_client = PhotoshopClientStub() - layers = photoshop_client.get_layers() - layers_meta = photoshop_client.get_layers_metadata() - for layer in layers: - layer_data = photoshop_client.read(layer, layers_meta) - - # Skip layers without metadata. - if layer_data is None: - continue - - # Skip containers. - if "container" in layer_data["id"]: - continue - - # child_layers = [*layer.Layers] - # self.log.debug("child_layers {}".format(child_layers)) - # if not child_layers: - # self.log.info("%s skipped, it was empty." % layer.Name) - # continue - - instance = context.create_instance(layer.name) - instance.append(layer) - instance.data.update(layer_data) - instance.data["families"] = self.families_mapping[ - layer_data["productType"] - ] - instance.data["publish"] = layer.visible - - # Produce diagnostic message for any graphical - # user interface interested in visualising it. - self.log.info("Found: \"%s\" " % instance.data["name"]) -``` - -#### Extractor Plugin -```python -import os - -from ayon_core.pipeline import publish -from ayon_photoshop import api as photoshop - - -class ExtractImage(publish.Extractor): - """Produce a flattened image file from instance - - This plug-in takes into account only the layers in the group. - """ - - label = "Extract Image" - hosts = ["photoshop"] - families = ["image"] - formats = ["png", "jpg"] - - def process(self, instance): - - staging_dir = self.staging_dir(instance) - self.log.info("Outputting image to {}".format(staging_dir)) - - # Perform extraction - stub = photoshop.stub() - files = {} - with photoshop.maintained_selection(): - self.log.info("Extracting %s" % str(list(instance))) - with photoshop.maintained_visibility(): - # Hide all other layers. - extract_ids = set([ll.id for ll in stub. - get_layers_in_layers([instance[0]])]) - - for layer in stub.get_layers(): - # limit unnecessary calls to client - if layer.visible and layer.id not in extract_ids: - stub.set_visible(layer.id, False) - - save_options = [] - if "png" in self.formats: - save_options.append('png') - if "jpg" in self.formats: - save_options.append('jpg') - - file_basename = os.path.splitext( - stub.get_active_document_name() - )[0] - for extension in save_options: - _filename = "{}.{}".format(file_basename, extension) - files[extension] = _filename - - full_filename = os.path.join(staging_dir, _filename) - stub.saveAs(full_filename, extension, True) - - representations = [] - for extension, filename in files.items(): - representations.append({ - "name": extension, - "ext": extension, - "files": filename, - "stagingDir": staging_dir - }) - instance.data["representations"] = representations - instance.data["stagingDir"] = staging_dir - - self.log.info(f"Extracted {instance} to {staging_dir}") -``` - -#### Loader Plugin -```python -from avalon import api, photoshop -from ayon_core.pipeline import load, get_representation_path - -stub = photoshop.stub() - - -class ImageLoader(load.LoaderPlugin): - """Load images - - Stores the imported asset in a container named after the asset. - """ - - families = ["image"] - representations = {"*"} - - def load(self, context, name=None, namespace=None, data=None): - path = self.filepath_from_context(context) - with photoshop.maintained_selection(): - layer = stub.import_smart_object(path) - - self[:] = [layer] - - return photoshop.containerise( - name, - namespace, - layer, - context, - self.__class__.__name__ - ) - - def update(self, container, context): - layer = container.pop("layer") - repre_entity = context["representation"] - with photoshop.maintained_selection(): - stub.replace_smart_object( - layer, get_representation_path(repre_entity) - ) - - stub.imprint( - layer, {"representation": repre_entity["id"]} - ) - - def remove(self, container): - container["layer"].Delete() - - def switch(self, container, context): - self.update(container, context) -``` For easier debugging of Javascript: https://community.adobe.com/t5/download-install/adobe-extension-debuger-problem/td-p/10911704?page=1 Add --enable-blink-features=ShadowDOMV0,CustomElementsV0 when starting Chrome -then localhost:8078 (port set in `photoshop\extension\.debug`) +then localhost:8078 (port set in `ayon-photoshop}\client\ayon-photoshop\api\.debug`) Or use Visual Studio Code https://medium.com/adobetech/extendscript-debugger-for-visual-studio-code-public-release-a2ff6161fa01 Or install CEF client from https://github.com/Adobe-CEP/CEP-Resources/tree/master/CEP_9.x + ## Resources - https://github.com/lohriialo/photoshop-scripting-python - https://www.adobe.com/devnet/photoshop/scripting.html From 1453db040b910b13d1115e38f5f51bd35d4bce57 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Thu, 14 Nov 2024 12:26:22 +0100 Subject: [PATCH 08/15] Added list of features --- README.md | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 69 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 44cdd82..cadd830 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,70 @@ -Photoshop Addon -=============== +# Photoshop Integration -Integration with Adobe Photoshop. +### Implemented features + +- publishing workfile +- publishing image product type + - for each layer + - for all visible layers altogether +- loading image/image sequences +- referencing image +- manage version of loaded containers + +## Setup + +The Photoshop integration requires two components to work; `extension` and `server`. + +### Extension + +There need to be done several setup steps first before running the AYON integration. First your active project need to have Photoshop (PS) defined in the project anatomy as an available tool including its filepath to the executable (being set by default). Secondly its neccessary to install PS extension manager which simplifies future extensions installation / management for PS. We skip the first step due to the fact it should be already preset by TD / Admin. And we jump to the second step instead right away. + +To install the extension manager , open the following link and download it first Anastasyi's Extension Manager. Open Anastasyi's Extension Manager and select Photoshop in the menu. Then go to {path to PS addon}hosts/photoshop/api/extension.zxp. Current location will be most likely in /User/AppData, on WINDOWS it would be something like c:\Users\YOUR_USER\AppData\Local\Ynput\AYON\addons\core_xx.xx.xx\ayon_core\hosts\photoshop\api. On Linux look in ~/.local/share/Ynput/AYON/addons, on Mac ~/Library/Application Support/Ynput/AYON/addons + + +### Server + +The easiest way to get the server and Photoshop launch is with: + +``` +python -c ^"import ayon_photoshop;ayon_photoshop.launch(""C:\Program Files\Adobe\Adobe Photoshop 2024\Photoshop.exe"")^" +``` + +`ayon_photoshop.launch` launches the application and server, and also closes the server when Photoshop exists. + +## Usage + +The Photoshop extension can be found under `Window > Extensions > Ayon`. Once launched you should be presented with a panel like this: + +![Ayon Panel](panel.png "AYON Panel") + + +## Developing + +### Extension +When developing the extension you can load it [unsigned](https://github.com/Adobe-CEP/CEP-Resources/blob/master/CEP_9.x/Documentation/CEP%209.0%20HTML%20Extension%20Cookbook.md#debugging-unsigned-extensions). + +When signing the extension you can use this [guide](https://github.com/Adobe-CEP/Getting-Started-guides/tree/master/Package%20Distribute%20Install#package-distribute-install-guide). + +``` +ZXPSignCmd -selfSignedCert NA NA Ayon Ayon-Photoshop Ayon extension.p12 +ZXPSignCmd -sign {path to ayon-photoshop}\client\ayon-photoshop\api\extension {path to ayon-photoshop}\client\ayon-photoshop\api\extension.zxp extension.p12 ayon +``` + +### Plugin Examples + +These plugins were made with the [polly config](https://github.com/mindbender-studio/config). To fully integrate and load, you will have to use this config and add `image` to the [integration plugin](https://github.com/mindbender-studio/config/blob/master/polly/plugins/publish/integrate_asset.py). + +For easier debugging of Javascript: +https://community.adobe.com/t5/download-install/adobe-extension-debuger-problem/td-p/10911704?page=1 +Add --enable-blink-features=ShadowDOMV0,CustomElementsV0 when starting Chrome +then localhost:8078 (port set in `ayon-photoshop}\client\ayon-photoshop\api\.debug`) + +Or use Visual Studio Code https://medium.com/adobetech/extendscript-debugger-for-visual-studio-code-public-release-a2ff6161fa01 + +Or install CEF client from https://github.com/Adobe-CEP/CEP-Resources/tree/master/CEP_9.x + +## Resources + - https://github.com/lohriialo/photoshop-scripting-python + - https://www.adobe.com/devnet/photoshop/scripting.html + - https://github.com/Adobe-CEP/Getting-Started-guides + - https://github.com/Adobe-CEP/CEP-Resources From ba60be8a36cedf9558932b215473671102d8935d Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Thu, 14 Nov 2024 12:26:29 +0100 Subject: [PATCH 09/15] Moved readme --- client/ayon_photoshop/api/README.md | 60 ----------------------------- 1 file changed, 60 deletions(-) delete mode 100644 client/ayon_photoshop/api/README.md diff --git a/client/ayon_photoshop/api/README.md b/client/ayon_photoshop/api/README.md deleted file mode 100644 index 488a374..0000000 --- a/client/ayon_photoshop/api/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# Photoshop Integration - -## Setup - -The Photoshop integration requires two components to work; `extension` and `server`. - -### Extension - -There need to be done several setup steps first before running the AYON integration. First your active project need to have Photoshop (PS) defined in the project anatomy as an available tool including its filepath to the executable (being set by default). Secondly its neccessary to install PS extension manager which simplifies future extensions installation / management for PS. We skip the first step due to the fact it should be already preset by TD / Admin. And we jump to the second step instead right away. - -To install the extension manager , open the following link and download it first Anastasyi's Extension Manager. Open Anastasyi's Extension Manager and select Photoshop in the menu. Then go to {path to PS addon}hosts/photoshop/api/extension.zxp. Current location will be most likely in /User/AppData, on WINDOWS it would be something like c:\Users\YOUR_USER\AppData\Local\Ynput\AYON\addons\core_xx.xx.xx\ayon_core\hosts\photoshop\api. On Linux look in ~/.local/share/Ynput/AYON/addons, on Mac ~/Library/Application Support/Ynput/AYON/addons - - -### Server - -The easiest way to get the server and Photoshop launch is with: - -``` -python -c ^"import ayon_photoshop;ayon_photoshop.launch(""C:\Program Files\Adobe\Adobe Photoshop 2024\Photoshop.exe"")^" -``` - -`ayon_photoshop.launch` launches the application and server, and also closes the server when Photoshop exists. - -## Usage - -The Photoshop extension can be found under `Window > Extensions > Ayon`. Once launched you should be presented with a panel like this: - -![Ayon Panel](panel.png "AYON Panel") - - -## Developing - -### Extension -When developing the extension you can load it [unsigned](https://github.com/Adobe-CEP/CEP-Resources/blob/master/CEP_9.x/Documentation/CEP%209.0%20HTML%20Extension%20Cookbook.md#debugging-unsigned-extensions). - -When signing the extension you can use this [guide](https://github.com/Adobe-CEP/Getting-Started-guides/tree/master/Package%20Distribute%20Install#package-distribute-install-guide). - -``` -ZXPSignCmd -selfSignedCert NA NA Ayon Ayon-Photoshop Ayon extension.p12 -ZXPSignCmd -sign {path to ayon-photoshop}\client\ayon-photoshop\api\extension {path to ayon-photoshop}\client\ayon-photoshop\api\extension.zxp extension.p12 ayon -``` - -### Plugin Examples - -These plugins were made with the [polly config](https://github.com/mindbender-studio/config). To fully integrate and load, you will have to use this config and add `image` to the [integration plugin](https://github.com/mindbender-studio/config/blob/master/polly/plugins/publish/integrate_asset.py). - -For easier debugging of Javascript: -https://community.adobe.com/t5/download-install/adobe-extension-debuger-problem/td-p/10911704?page=1 -Add --enable-blink-features=ShadowDOMV0,CustomElementsV0 when starting Chrome -then localhost:8078 (port set in `ayon-photoshop}\client\ayon-photoshop\api\.debug`) - -Or use Visual Studio Code https://medium.com/adobetech/extendscript-debugger-for-visual-studio-code-public-release-a2ff6161fa01 - -Or install CEF client from https://github.com/Adobe-CEP/CEP-Resources/tree/master/CEP_9.x - -## Resources - - https://github.com/lohriialo/photoshop-scripting-python - - https://www.adobe.com/devnet/photoshop/scripting.html - - https://github.com/Adobe-CEP/Getting-Started-guides - - https://github.com/Adobe-CEP/CEP-Resources From 5ed39aa3787de9f9486b0d8625f43daa3f31b839 Mon Sep 17 00:00:00 2001 From: ynbot Date: Mon, 25 Nov 2024 13:57:53 +0000 Subject: [PATCH 10/15] [Automated] Update assign_pr_to_project caller workflow --- .github/workflows/assign_pr_to_project.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/assign_pr_to_project.yml diff --git a/.github/workflows/assign_pr_to_project.yml b/.github/workflows/assign_pr_to_project.yml new file mode 100644 index 0000000..86707fc --- /dev/null +++ b/.github/workflows/assign_pr_to_project.yml @@ -0,0 +1,15 @@ +name: 🔸Auto assign pr +on: + pull_request: + types: + - opened + +jobs: + auto-assign-pr: + uses: ynput/ops-repo-automation/.github/workflows/pr_to_project.yml@develop + with: + repo: "${{ github.repository }}" + project_id: 16 + pull_request_number: ${{ github.event.pull_request.number }} + secrets: + token: ${{ secrets.YNPUT_BOT_TOKEN }} From 92eaec0ba6831ef235a84fe50dd6ce1d3e0a45d0 Mon Sep 17 00:00:00 2001 From: ynbot Date: Mon, 25 Nov 2024 14:08:23 +0000 Subject: [PATCH 11/15] [Automated] Update validate_pr_labels caller workflow --- .github/workflows/validate_pr_labels.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/validate_pr_labels.yml diff --git a/.github/workflows/validate_pr_labels.yml b/.github/workflows/validate_pr_labels.yml new file mode 100644 index 0000000..00e5742 --- /dev/null +++ b/.github/workflows/validate_pr_labels.yml @@ -0,0 +1,18 @@ +name: 🔎 Validate PR Labels +on: + pull_request: + types: + - opened + - edited + - labeled + - unlabeled + +jobs: + validate-type-label: + uses: ynput/ops-repo-automation/.github/workflows/validate_pr_labels.yml@develop + with: + repo: "${{ github.repository }}" + pull_request_number: ${{ github.event.pull_request.number }} + query_prefix: "type: " + secrets: + token: ${{ secrets.YNPUT_BOT_TOKEN }} From 01a4c1449e5007c7961e2a9ee19e1c0b0d2212ff Mon Sep 17 00:00:00 2001 From: ynbot Date: Tue, 26 Nov 2024 11:47:12 +0000 Subject: [PATCH 12/15] [Automated] Update assign_pr_to_project caller workflow --- .github/workflows/assign_pr_to_project.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/assign_pr_to_project.yml b/.github/workflows/assign_pr_to_project.yml index 86707fc..4bb3d17 100644 --- a/.github/workflows/assign_pr_to_project.yml +++ b/.github/workflows/assign_pr_to_project.yml @@ -6,7 +6,7 @@ on: jobs: auto-assign-pr: - uses: ynput/ops-repo-automation/.github/workflows/pr_to_project.yml@develop + uses: ynput/ops-repo-automation/.github/workflows/pr_to_project.yml@main with: repo: "${{ github.repository }}" project_id: 16 From d9a75943a298d6fb8b7102bbd6e78cfb61ff61b0 Mon Sep 17 00:00:00 2001 From: ynbot Date: Tue, 26 Nov 2024 11:52:35 +0000 Subject: [PATCH 13/15] [Automated] Update validate_pr_labels caller workflow --- .github/workflows/validate_pr_labels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate_pr_labels.yml b/.github/workflows/validate_pr_labels.yml index 00e5742..f25e263 100644 --- a/.github/workflows/validate_pr_labels.yml +++ b/.github/workflows/validate_pr_labels.yml @@ -9,7 +9,7 @@ on: jobs: validate-type-label: - uses: ynput/ops-repo-automation/.github/workflows/validate_pr_labels.yml@develop + uses: ynput/ops-repo-automation/.github/workflows/validate_pr_labels.yml@main with: repo: "${{ github.repository }}" pull_request_number: ${{ github.event.pull_request.number }} From 0dc076eba3b3e008500684f831d2cd4259cccfca Mon Sep 17 00:00:00 2001 From: ynbot Date: Tue, 26 Nov 2024 15:18:02 +0000 Subject: [PATCH 14/15] [Automated] Update assign_pr_to_project caller workflow --- .github/workflows/assign_pr_to_project.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/assign_pr_to_project.yml b/.github/workflows/assign_pr_to_project.yml index 4bb3d17..92d2ff2 100644 --- a/.github/workflows/assign_pr_to_project.yml +++ b/.github/workflows/assign_pr_to_project.yml @@ -1,5 +1,16 @@ name: 🔸Auto assign pr on: + workflow_dispatch: + inputs: + pr_number: + type: number + description: "Run workflow for this PR number" + required: true + project_id: + type: number + description: "Github Project Number" + required: true + default: 16 pull_request: types: - opened @@ -9,7 +20,7 @@ jobs: uses: ynput/ops-repo-automation/.github/workflows/pr_to_project.yml@main with: repo: "${{ github.repository }}" - project_id: 16 - pull_request_number: ${{ github.event.pull_request.number }} + project_id: ${{ inputs.project_id || 16 }} + pull_request_number: ${{ github.event.pull_request.number || inputs.pr_number }} secrets: token: ${{ secrets.YNPUT_BOT_TOKEN }} From 602287f5257d275df741bddfc43d24af1d23fae6 Mon Sep 17 00:00:00 2001 From: ynbot Date: Fri, 29 Nov 2024 08:17:24 +0000 Subject: [PATCH 15/15] [Automated] Update assign_pr_to_project caller workflow --- .github/workflows/assign_pr_to_project.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/assign_pr_to_project.yml b/.github/workflows/assign_pr_to_project.yml index 92d2ff2..14e1a02 100644 --- a/.github/workflows/assign_pr_to_project.yml +++ b/.github/workflows/assign_pr_to_project.yml @@ -17,10 +17,11 @@ on: jobs: auto-assign-pr: + if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} uses: ynput/ops-repo-automation/.github/workflows/pr_to_project.yml@main with: repo: "${{ github.repository }}" - project_id: ${{ inputs.project_id || 16 }} - pull_request_number: ${{ github.event.pull_request.number || inputs.pr_number }} + project_id: "${{ inputs.project_id }}" + pull_request_number: "${{ github.event.pull_request.number || inputs.pr_number }}" secrets: token: ${{ secrets.YNPUT_BOT_TOKEN }}