mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #2775 from pypeclub/feature/OP-2642_Configure-which-reviewables-are-posted-on-Slack
Slack: Added regex for filtering on subset names
This commit is contained in:
commit
73d3ef1177
4 changed files with 14 additions and 2 deletions
|
|
@ -20,18 +20,23 @@ class CollectSlackFamilies(pyblish.api.InstancePlugin):
|
|||
def process(self, instance):
|
||||
task_name = io.Session.get("AVALON_TASK")
|
||||
family = self.main_family_from_instance(instance)
|
||||
|
||||
key_values = {
|
||||
"families": family,
|
||||
"tasks": task_name,
|
||||
"hosts": instance.data["anatomyData"]["app"],
|
||||
"subsets": instance.data["subset"]
|
||||
}
|
||||
|
||||
profile = filter_profiles(self.profiles, key_values,
|
||||
logger=self.log)
|
||||
|
||||
if not profile:
|
||||
self.log.info("No profile found, notification won't be send")
|
||||
return
|
||||
|
||||
# make slack publishable
|
||||
if profile:
|
||||
self.log.info("Found profile: {}".format(profile))
|
||||
if instance.data.get('families'):
|
||||
instance.data['families'].append('slack')
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
"hosts": [],
|
||||
"task_types": [],
|
||||
"tasks": [],
|
||||
"subsets": [],
|
||||
"channel_messages": []
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -69,6 +69,12 @@
|
|||
"type": "list",
|
||||
"object_type": "text"
|
||||
},
|
||||
{
|
||||
"key": "subsets",
|
||||
"label": "Subset names",
|
||||
"type": "list",
|
||||
"object_type": "text"
|
||||
},
|
||||
{
|
||||
"type": "separator"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ It is possible to create multiple tokens and configure different scopes for them
|
|||
|
||||
### Profiles
|
||||
Profiles are used to select when to trigger notification. One or multiple profiles
|
||||
could be configured, `Families`, `Task names` (regex available), `Host names` combination is needed.
|
||||
could be configured, `Families`, `Task names` (regex available), `Host names`, `Subset names` (regex available) combination is needed.
|
||||
|
||||
Eg. If I want to be notified when render is published from Maya, setting is:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue