github-actions-slack icon indicating copy to clipboard operation
github-actions-slack copied to clipboard

Include optional params on update?

Open halberom opened this issue 3 years ago • 2 comments

Hello

Thanks for this action, very nice. One thing I'm wondering is whether it would be possible to add support for including optional params on message update. I'm thinking of appending block sections as new details become available during a build.

Also, would it be possible to include an example showing the use of attachments/blocks? I managed it but found it a bit tricky, and it wasn't 100% clear on what other params were mandatory - I had to go to the code for that. Also, I believe it's possible to send just a block section, so maybe don't make the text field mandatory?

Thanks again.

halberom avatar Feb 11 '22 12:02 halberom

Hi!

It's a good idea. Need to check what it would mean for the implementation.

From what I know, today blocks don't support "append" in the API, you have to push the old + the new to fake that behavior.

archive avatar Feb 12 '22 15:02 archive

Sorry for the long delay. To enable append update we need to change the permission level to allow read. Since I need to read the old post, append, and then update. From I see, the slack api is only replace, not append.

Would that feel ok, to give some more permissions?

archive avatar Mar 10 '22 16:03 archive

What is the feeling of this? This capability would require the action to have vastly more permissions, which I don't really like.

archive avatar Oct 14 '22 07:10 archive

@halberom - Support for blocks is now released https://github.com/archive/github-actions-slack/releases/tag/v2.6.0.

It will not support append mode, it will overwrite what was before.

archive avatar Oct 14 '22 23:10 archive