Skip to content

Conversation

zimeg
Copy link
Member

@zimeg zimeg commented Jul 21, 2025

Summary

This PR adds the workflows.featured.{add|list|remove|set} methods:

Reviewers

Gather shortcut trigger IDs and a user token for the following methods:

const response1 = await app.client.workflows.featured.add({
  channel_id: "C0123456789",
  trigger_ids: ["Ft0123456789"]
});
console.log("response1", response1);
const response2 = await app.client.workflows.featured.list({
  channel_ids: ["C0123456789"],
})
console.log("response2", response2);
const response3 = await app.client.workflows.featured.remove({
  channel_id: "C0123456789",
  trigger_ids: ["Ft0123456789"],
});
console.log("response3", response3);
const response4 = await app.client.workflows.featured.set({
  channel_id: "C0123456789",
  trigger_ids: ["Ft0123456789"]
});
console.log("response4", response4);

Requirements

@zimeg zimeg added this to the [email protected] milestone Jul 21, 2025
@zimeg zimeg self-assigned this Jul 21, 2025
@zimeg zimeg added semver:minor enhancement M-T: A feature request for new functionality pkg:web-api applies to `@slack/web-api` labels Jul 21, 2025
Copy link

codecov bot commented Jul 21, 2025

Codecov Report

Attention: Patch coverage is 94.23077% with 3 lines in your changes missing coverage. Please review.

Project coverage is 92.74%. Comparing base (a40348c) to head (3b967a8).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2303      +/-   ##
==========================================
+ Coverage   92.69%   92.74%   +0.05%     
==========================================
  Files          38       38              
  Lines       10609    10660      +51     
  Branches      683      687       +4     
==========================================
+ Hits         9834     9887      +53     
+ Misses        763      761       -2     
  Partials       12       12              
Flag Coverage Δ
cli-hooks 95.23% <ø> (ø)
cli-test 94.74% <ø> (ø)
oauth 77.39% <ø> (ø)
socket-mode 61.87% <ø> (ø)
web-api 97.99% <94.23%> (+0.04%) ⬆️
webhook 96.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member Author

@zimeg zimeg left a comment

Choose a reason for hiding this comment

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

📝 Leaving a few notes for the most kind reviewers. FYI I'm hoping to make similar changes to other SDKs soon as well-

@@ -964,7 +964,7 @@ function parseRetryHeaders(response: AxiosResponse): number | undefined {
* @param logger instance of web clients logger
*/
function warnDeprecations(method: string, logger: Logger): void {
const deprecatedMethods = ['workflows.'];
const deprecatedMethods = ['workflows.stepCompleted', 'workflows.stepFailed', 'workflows.updateStep'];
Copy link
Member Author

Choose a reason for hiding this comment

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

📣 Somewhat related change to avoid warnings of these new methods being deprecated:

[WARN]  web-api:WebClient:0 workflows.featured.add is deprecated. Please check on https://docs.slack.dev/reference/methods for an alternative.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice; did ['workflows.'] trigger this warning for any method that started with workflows?

Copy link
Member Author

Choose a reason for hiding this comment

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

@vegeris It did and I was super confused at first, thinking that was sent from the API!

I forget when this logic was first added, but narrowing the deprecations down to exact methods seems useful going forward since this might've been warning for adjacent methods 😳

Copy link
Contributor

@vegeris vegeris left a comment

Choose a reason for hiding this comment

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

LGTM :)

Only thought is that the PR could potentially add some tests

Copy link
Contributor

@WilliamBergamin WilliamBergamin left a comment

Choose a reason for hiding this comment

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

Thanks for working on this 💯

@zimeg
Copy link
Member Author

zimeg commented Jul 22, 2025

@vegeris @WilliamBergamin Thank y'all both for the review and of course the needed tests!

I'm going to merge this now but will follow up soon with the related PRs in other SDKs. Perhaps soon too we can cut a release with these new methods? 🚢 💨

@zimeg zimeg merged commit dd797cf into main Jul 22, 2025
110 of 111 checks passed
@zimeg zimeg deleted the zimeg-feat-web-api-workflows-featured branch July 22, 2025 18:32
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 pkg:web-api applies to `@slack/web-api` semver:minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants