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

What is needed to mention works on Slack? #246

Closed
lucianomlima opened this issue May 8, 2023 · 5 comments · Fixed by #252
Closed

What is needed to mention works on Slack? #246

lucianomlima opened this issue May 8, 2023 · 5 comments · Fixed by #252

Comments

@lucianomlima
Copy link
Contributor

lucianomlima commented May 8, 2023

Hi, I'm trying to setup slack mention action on github but I can't receive the messages in channel.
What my webhook need to do to action mention in a channel?
From the Workflow builder I can create a webhook workflow and choose the channel but I need to create a message text too and I don't know if I need to put a variable or not. Should I create an app intead?

Can you guide me ou show me an example?

@lucianomlima
Copy link
Contributor Author

lucianomlima commented May 11, 2023

I understand, I need to create an app instead of a workflow. I'm using for review request and request review from a team in github, does not mention an user group on slack. The problem is it's using a user mention instead of user group mention.

There are documentation related to this here:
https://api.slack.com/reference/surfaces/formatting#mentioning-groups

Should be modified from <@ID> to <!subteam^ID> to works.

It would also be great if it was possible to customize the message. If I can help, please let me know @abeyuya.

@abeyuya
Copy link
Owner

abeyuya commented May 14, 2023

@lucianomlima Thank you for your interest in this library.

Should be modified from <@ID> to <!subteam^ID> to work.

Thanks for the info, I will consider updating the README.

It would also be great if it was possible to customize the message.

This is a very interesting feature. Specifically, do you want to customize the following message?

const message = `<@${requestedSlackUserId}> has been requested to review <${url}|${title}> by ${requestUsername}.`;

`<@${prOwnerSlackUserId}> has been approved <${info.url}|${info.title}> by ${approveOwner}.`,

@lucianomlima
Copy link
Contributor Author

I can open a pull request for the user group slack mention change.

Regarding the change in messages, what do you think of adding the messages in the action settings in the yml file?

@lucianomlima
Copy link
Contributor Author

@abeyuya please, take a look #252

@abeyuya
Copy link
Owner

abeyuya commented Jun 15, 2023

@lucianomlima Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants