Skip to content

Conversation

@skiedude
Copy link
Contributor

@skiedude skiedude commented Oct 1, 2024

Related to StackStorm/hubot-stackstorm#237 this improves orquesta workflows by passing along the slack_message_id if its found in the payload from an action-alias execution.

This ID can then be used with slack pack actions to respond in a thread when using the default action-alias result does not facilitate the needs of the workflow (One example being uploading multiple files).

I can update the changelog, docs and potentially the orquesta_runner test_context.py if this is something that would be approved.

The new context key would be available like api_user, source_channel and user using <% ctx(st2).slack_message_id %>

    "st2_context": {
      "action_execution_id": "66fc1bbba71302136ed88136",
      "api_url": "http://127.0.0.1:9101/v1",
      "user": "username",
      "pack": "pack_name",
      "action": "pack_name.action_name",
      "runner": "orquesta",
      "api_user": "jzufelt",
      "source_channel": "########",
      "slack_message_id": "1727798203.159779",
      "workflow_execution_id": "66fc1bbbdea5892945075d08"
    }

Question
One thing I'm not familiar with is the other chat backend payloads, is it possible that payload.source_context['message']['id'] exists in other backends in which case the key name of slack_message_id would be a bit misleading?

@pull-request-size pull-request-size bot added the size/XS PR that changes 0-9 lines. Quick fix/merge. label Oct 1, 2024
@skiedude skiedude closed this Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS PR that changes 0-9 lines. Quick fix/merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant