Skip to content

Conversation

@srtaalej
Copy link
Contributor

@srtaalej srtaalej commented Dec 16, 2025

This PR adds missing workflow.featured methods add, list, remove, set

Testing:

import com.slack.api.Slack;
import com.slack.api.methods.SlackApiException;
import com.slack.api.methods.response.workflows.WorkflowsFeaturedAddResponse;
import com.slack.api.methods.response.workflows.WorkflowsFeaturedListResponse;
import com.slack.api.methods.response.workflows.WorkflowsFeaturedRemoveResponse;
import com.slack.api.methods.response.workflows.WorkflowsFeaturedSetResponse;

import java.util.List;

Slack slack = Slack.getInstance();
String token = System.getenv("SLACK_BOT_TOKEN");

WorkflowsFeaturedAddResponse add = slack.methods(token)
    .workflowsFeaturedAdd(req -> req.channelId("C04CRUE6MU3").triggerIds(List.of("Ft07BVE8UHEK", "Ft0A4EDARZL6")));
System.out.println(add);

WorkflowsFeaturedListResponse list = slack.methods(token)
    .workflowsFeaturedList(req -> req.channelIds(List.of("C04CRUE6MU3")));
System.out.println(list);

WorkflowsFeaturedRemoveResponse remove = slack.methods(token)
    .workflowsFeaturedRemove(req -> req.channelId("C04CRUE6MU3").triggerIds(List.of("Ft07BVE8UHEK")));
System.out.println(remove);

WorkflowsFeaturedSetResponse set = slack.methods(token)
    .workflowsFeaturedSet(req -> req.channelId("C04CRUE6MU3").triggerIds(List.of("Ft0A4EDARZL6", "Ft07BVE8UHEK")));
System.out.println(set);

Category (place an x in each of the [ ])

  • bolt (Bolt for Java)
  • bolt-{sub modules} (Bolt for Java - optional modules)
  • slack-api-client (Slack API Clients)
  • slack-api-model (Slack API Data Models)
  • slack-api-*-kotlin-extension (Kotlin Extensions for Slack API Clients)
  • slack-app-backend (The primitive layer of Bolt for Java)

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.

@srtaalej srtaalej self-assigned this Dec 16, 2025
@srtaalej srtaalej added enhancement M-T: A feature request for new functionality project:slack-api-client project:slack-api-client labels Dec 16, 2025
@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

❌ Patch coverage is 90.69767% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.28%. Comparing base (a24a615) to head (5ae11bc).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...java/com/slack/api/methods/RequestFormBuilder.java 82.60% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1542      +/-   ##
============================================
+ Coverage     72.98%   73.28%   +0.30%     
- Complexity     4476     4511      +35     
============================================
  Files           477      477              
  Lines         14223    14266      +43     
  Branches       1483     1487       +4     
============================================
+ Hits          10380    10455      +75     
+ Misses         2964     2919      -45     
- Partials        879      892      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@srtaalej srtaalej marked this pull request as ready for review December 17, 2025 23:13
@srtaalej srtaalej requested a review from a team as a code owner December 17, 2025 23:13
@zimeg zimeg changed the title feat: add missing workflow.featured methods feat: add workflow.featured.{add|list|remove|set} methods Dec 18, 2025
@zimeg
Copy link
Member

zimeg commented Dec 18, 2025

🧪 Testing steps

import com.slack.api.Slack;
import com.slack.api.methods.SlackApiException;
import com.slack.api.methods.response.workflows.WorkflowsFeaturedAddResponse;
import com.slack.api.methods.response.workflows.WorkflowsFeaturedListResponse;
import com.slack.api.methods.response.workflows.WorkflowsFeaturedRemoveResponse;
import com.slack.api.methods.response.workflows.WorkflowsFeaturedSetResponse;

import java.util.List;

Slack slack = Slack.getInstance();
String token = System.getenv("SLACK_BOT_TOKEN");

WorkflowsFeaturedAddResponse add = slack.methods(token)
    .workflowsFeaturedAdd(req -> req.channelId("C04CRUE6MU3").triggerIds(List.of("Ft07BVE8UHEK", "Ft0A4EDARZL6")));
System.out.println(add);

WorkflowsFeaturedListResponse list = slack.methods(token)
    .workflowsFeaturedList(req -> req.channelIds(List.of("C04CRUE6MU3")));
System.out.println(list);

WorkflowsFeaturedRemoveResponse remove = slack.methods(token)
    .workflowsFeaturedRemove(req -> req.channelId("C04CRUE6MU3").triggerIds(List.of("Ft07BVE8UHEK")));
System.out.println(remove);

WorkflowsFeaturedSetResponse set = slack.methods(token)
    .workflowsFeaturedSet(req -> req.channelId("C04CRUE6MU3").triggerIds(List.of("Ft0A4EDARZL6", "Ft07BVE8UHEK")));
System.out.println(set);

Copy link
Member

@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.

@srtaalej LGTM! Thanks so much for featuring these methods 🙏 ✨

I left a few comments but nothing is blocking IMHO. Some are related to testing and I was curious if a bot token was working for you? I found a restricted_action error so I had to use a user token.

srtaalej and others added 2 commits December 18, 2025 14:38
…orkflows/WorkflowsFeaturedAddRequest.java

Co-authored-by: Eden Zimbelman <[email protected]>
…orkflows/WorkflowsFeaturedRemoveRequest.java

Co-authored-by: Eden Zimbelman <[email protected]>
@zimeg zimeg added this to the 1.47.0 milestone Dec 18, 2025
@srtaalej srtaalej merged commit bf988dc into main Dec 18, 2025
6 checks passed
@srtaalej srtaalej deleted the ale-workflow-feature-mthds branch December 18, 2025 20:44
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 project:slack-api-client project:slack-api-client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants