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

fix(deps): update dependency com.slack.api:slack-api-client to v1.41.0 #1127

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 20, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
com.slack.api:slack-api-client 1.40.3 -> 1.41.0 age adoption passing confidence

Release Notes

slackapi/java-slack-sdk (com.slack.api:slack-api-client)

v1.41.0: version 1.41.0

Announcements

Support for custom steps

Bolt for Java now supoports the way to build custom steps in Workflow Builder. Here is a quick example demonstrating how it works:

app.function("sample_function", (req, ctx) -> {
  app.executorService().submit(() -> {
    try {
      var userId = req.getEvent().getInputs().get("user_id").asString();
      var response = ctx.client().chatPostMessage(r -> r
        .channel(userId) // sending a DM
        .text("Hi! Thank you for submitting the request! We'll let you know once the processing completes.")
      );
      var outputs = new HashMap<String, Object>();
      outputs.put("channel_id", response.getChannel());
      outputs.put("ts", response.getTs());
      ctx.complete(outputs);
    } catch (Exception e) {
      ctx.logger.error(e.getMessage(), e);
      try {
        ctx.fail("Failed to handle 'sample_function' custom step execution (error: " + e.getMessage() + ")");
      } catch (Exception ex) {
        ctx.logger.error(e.getMessage(), e);
      }
    }
  });
  return ctx.ack();
});

The App Manifest for the custom step would be something like this:

"functions": {
    "sample_function": {
        "title": "Send a request",
        "description": "Send some request to the backend",
        "input_parameters": {
            "user_id": {
                "type": "slack#/types/user_id",
                "title": "User",
                "description": "Who to send it",
                "is_required": true,
                "hint": "Select a user in the workspace",
                "name": "user_id"
            }
        },
        "output_parameters": {
            "channel_id": {
                "type": "slack#/types/channel_id",
                "title": "DM ID",
                "description": "The DM ID",
                "is_required": true,
                "name": "channel_id"
            },
            "ts": {
                "type": "string",
                "title": "Message timestamp",
                "description": "Sent message timestamp",
                "is_required": true,
                "name": "ts"
            }
        }
    }
}

Please refer to https://api.slack.com/automation/functions/custom-bolt for more details!

Changes



Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@totto totto merged commit f0183d4 into master Aug 20, 2024
3 of 4 checks passed
@renovate renovate bot deleted the renovate/com.slack.api-slack-api-client-1.x branch August 20, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant