Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bradh workflow extension support #546

Conversation

selfcontained
Copy link
Contributor

Summary

This PR adds support for a new feature entering open beta called Workflow Steps from Apps. It allows Slack apps to provide custom steps for Slack Workflows. This new feature requires the following updates to Bolt, encompassed in these changes:

  • A new workflow_step_edit action
  • A new workflow_step_execute event
  • Exclusion of the say function from the workflow_step_edit handler
  • Updating getTypeAndConversation() to allow workflow_step_edit action to fall into the action handling logic

Requirements (place an x in each [ ])

@codecov
Copy link

codecov bot commented Jul 15, 2020

Codecov Report

Merging #546 into feat-workflow-steps will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@                 Coverage Diff                  @@
##           feat-workflow-steps     #546   +/-   ##
====================================================
  Coverage                83.13%   83.13%           
====================================================
  Files                        7        7           
  Lines                      593      593           
  Branches                   184      184           
====================================================
  Hits                       493      493           
  Misses                      68       68           
  Partials                    32       32           
Impacted Files Coverage Δ
src/helpers.ts 90.90% <100.00%> (ø)
src/ExpressReceiver.ts 65.21% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0b37456...22bcdfb. Read the comment docs.

@clavin clavin added the enhancement M-T: A feature request for new functionality label Jul 15, 2020
trigger_id: string;
user: {
id: string;
name: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user object in action payload has a key of username rather than name

action_ts: string; // undocumented
workflow_step: {
workflow_id: string;
step_id: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workflow_step also has keys for inputs and outputs in either case (add vs. edit)

callback_id: string;
workflow_step: {
workflow_step_execute_id: string;
workflow_id: string,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few commas here instead of semi-colons

Copy link
Contributor

@misscoded misscoded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few suggestions

src/types/actions/workflow-step-edit.ts Outdated Show resolved Hide resolved
src/types/actions/workflow-step-edit.ts Show resolved Hide resolved
src/types/events/base-events.ts Outdated Show resolved Hide resolved
@CLAassistant
Copy link

CLAassistant commented Jul 16, 2020

CLA assistant check
All committers have signed the CLA.

trigger_id: string;
user: {
id: string;
username: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was changed from name to username based on the payloads

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching and fixes all of those 😄

@stevengill stevengill merged commit 92edcab into slackapi:feat-workflow-steps Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement M-T: A feature request for new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants