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 #1271 Add slack_file object to image block / block element classes #1272

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

seratch
Copy link
Contributor

@seratch seratch commented Jan 23, 2024

This pull request resolves #1271

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.

@seratch seratch added enhancement M-T: A feature request for new functionality project:slack-api-model project:slack-api-model labels Jan 23, 2024
@seratch seratch added this to the 1.38.0 milestone Jan 23, 2024
@seratch seratch requested a review from filmaj January 23, 2024 03:24
@seratch seratch self-assigned this Jan 23, 2024
Copy link

codecov bot commented Jan 23, 2024

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (fdab0f2) 74.36% compared to head (245f07d) 74.30%.

Files Patch % Lines
.../model/kotlin_extension/block/ImageBlockBuilder.kt 50.00% 4 Missing ⚠️
...ension/block/composition/SlackFileObjectBuilder.kt 80.00% 2 Missing ⚠️
...api/model/block/composition/BlockCompositions.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1272      +/-   ##
============================================
- Coverage     74.36%   74.30%   -0.06%     
- Complexity     4125     4128       +3     
============================================
  Files           443      444       +1     
  Lines         13080    13102      +22     
  Branches       1323     1323              
============================================
+ Hits           9727     9736       +9     
- Misses         2580     2594      +14     
+ Partials        773      772       -1     

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

Copy link
Contributor

@filmaj filmaj 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 tackling this! The tests look extensive.

assertThat(deletion.getError(), is(nullValue()));
Thread.sleep(500L);

ChatPostMessageResponse response = client.chatPostMessage(r -> r
Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose there is no way to validate this message correctly displays the image?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only approach would be to check if there are the blocks in the message property in the response, but it sounds repetitive to me. Validating whether there is no error code such as invalid_blocks in the response (like the current test code does) should be good enough this time.

@seratch
Copy link
Contributor Author

seratch commented Jan 23, 2024

Thanks for the quick review!

@seratch seratch merged commit 84723a5 into slackapi:main Jan 23, 2024
4 checks passed
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-model project:slack-api-model
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add slack_file object to image block / block element classes
2 participants