Skip to content

Commit

Permalink
Merge branch 'develop' into feature/AY-5235_Delivery-Farm-Publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubjezek001 committed Dec 11, 2024
2 parents b09266b + aee99ca commit 45bbc2f
Show file tree
Hide file tree
Showing 60 changed files with 1,779 additions and 875 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/assign_pr_to_project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: 🔸Auto assign pr
on:
workflow_dispatch:
inputs:
pr_number:
type: string
description: "Run workflow for this PR number"
required: true
project_id:
type: string
description: "Github Project Number"
required: true
default: "16"
pull_request:
types:
- opened

env:
GH_TOKEN: ${{ github.token }}

jobs:
get-pr-repo:
runs-on: ubuntu-latest
outputs:
pr_repo_name: ${{ steps.get-repo-name.outputs.repo_name || github.event.pull_request.head.repo.full_name }}

# INFO `github.event.pull_request.head.repo.full_name` is not available on manual triggered (dispatched) runs
steps:
- name: Get PR repo name
if: ${{ github.event_name == 'workflow_dispatch' }}
id: get-repo-name
run: |
repo_name=$(gh pr view ${{ inputs.pr_number }} --json headRepository,headRepositoryOwner --repo ${{ github.repository }} | jq -r '.headRepositoryOwner.login + "/" + .headRepository.name')
echo "repo_name=$repo_name" >> $GITHUB_OUTPUT
auto-assign-pr:
needs:
- get-pr-repo
if: ${{ needs.get-pr-repo.outputs.pr_repo_name == github.repository }}
uses: ynput/ops-repo-automation/.github/workflows/pr_to_project.yml@main
with:
repo: "${{ github.repository }}"
project_id: ${{ inputs.project_id != '' && fromJSON(inputs.project_id) || 16 }}
pull_request_number: ${{ github.event.pull_request.number || fromJSON(inputs.pr_number) }}
secrets:
# INFO fallback to default `github.token` is required for PRs from forks
# INFO organization secrets won't be available to forks
token: ${{ secrets.YNPUT_BOT_TOKEN || github.token}}
18 changes: 18 additions & 0 deletions .github/workflows/validate_pr_labels.yml
Original file line number Diff line number Diff line change
@@ -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@main
with:
repo: "${{ github.repository }}"
pull_request_number: ${{ github.event.pull_request.number }}
query_prefix: "type: "
secrets:
token: ${{ secrets.YNPUT_BOT_TOKEN }}
4 changes: 2 additions & 2 deletions client/ayon_core/addon/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,8 @@ def ensure_is_process_ready(
Implementation of this method is optional.
Note:
The logic can be similar to logic in tray, but tray does not require
to be logged in.
The logic can be similar to logic in tray, but tray does not
require to be logged in.
Args:
process_context (ProcessContext): Context of child
Expand Down
3 changes: 2 additions & 1 deletion client/ayon_core/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ def publish_report_viewer():
@main_cli.command()
@click.argument("output_path")
@click.option("--project", help="Define project context")
@click.option("--folder", help="Define folder in project (project must be set)")
@click.option(
"--folder", help="Define folder in project (project must be set)")
@click.option(
"--strict",
is_flag=True,
Expand Down
4 changes: 3 additions & 1 deletion client/ayon_core/lib/attribute_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,9 @@ def serialize(self):
return data

@staticmethod
def prepare_enum_items(items: "EnumItemsInputType") -> List["EnumItemDict"]:
def prepare_enum_items(
items: "EnumItemsInputType"
) -> List["EnumItemDict"]:
"""Convert items to unified structure.
Output is a list where each item is dictionary with 'value'
Expand Down
14 changes: 2 additions & 12 deletions client/ayon_core/lib/local_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,7 @@ def delete_item(self, name):
@abstractmethod
def _delete_item(self, name):
# type: (str) -> None
"""Delete item from settings.
Note:
see :meth:`ayon_core.lib.user_settings.ARegistrySettings.delete_item`
"""
"""Delete item from settings."""
pass

def __delitem__(self, name):
Expand Down Expand Up @@ -433,12 +428,7 @@ def delete_item_from_section(self, section, name):
config.write(cfg)

def _delete_item(self, name):
"""Delete item from default section.
Note:
See :meth:`~ayon_core.lib.IniSettingsRegistry.delete_item_from_section`
"""
"""Delete item from default section."""
self.delete_item_from_section("MAIN", name)


Expand Down
Loading

0 comments on commit 45bbc2f

Please sign in to comment.