WordPress / five-for-the-future

Plugins and themes for the Five for the Future subsite
https://wordpress.org/five-for-the-future/
55 stars 25 forks source link

Send Slack notifications to team channel #36

Open iandunn opened 5 years ago

iandunn commented 5 years ago

When a contributor indicates that their time will be sponsored for a specific team, that team's channel should get a notification, so that they know to start assigning them work. e.g.,

Tadpole Collective just pledged 3 contributors for 14 hours a month to Community and 1 other team! 🎉 Please reach out to their contributors and help them get involved in one of your team's priorities!

https://wordpress.org/five-for-the-future/pledge/tadpole-collective/

JaneSmith commented 5 years ago

I did? I don't even know anything about this project.

iandunn commented 5 years ago

Do we need to ask the contributor if they want the notification to go out or not?

I'm leaning towards not allowing people to opt-out, because accountability is an important aspect of this, but I'm curious to hear if there are use cases that I'm not seeing, etc.

iandunn commented 5 years ago

@andreamiddleton has a good idea: we could make the announcement for the company, rather than the contributors. That would avoid putting people on the spot.

I think the team reps/members will still need a way to know who the contributors are, though, in order to onboard them.

andreamiddleton commented 5 years ago

Was that my idea? I thought it was yours! The notification could include a link to the pledge so that contributor teams could easily navigate to the pledge and see what people are listed.

iandunn commented 5 years ago

Ah, yeah, that's perfect!

iandunn commented 5 years ago

Given ^, we might want to trigger the ping when 100% of the contributors have confirmed, rather than when the pledge is initially published.

iandunn commented 5 years ago

For contributors who don't have a w.org sandbox, you can just create a stub to handle the Slack API / sending stuff, and focus on the other parts, like hooking into the right event, crafting the message, and calling the stub function.

Here's the stub signature:

function slack_dm( $channel, $message ) {
    // calling this will handle sending the message to Slack via an HTTP request
}
iandunn commented 5 years ago

It'd probably be good to trigger it when 70% of contributors have confirmed, rather than 100%, since it's common for a few people to not bother confirming, or for a pledge admin to make a typo and send it to the wrong person, etc.

andreamiddleton commented 4 years ago

I think we should hold off on this until we can learn from contributor teams if that kind of notification would be signal or noise for them. I'll ask in a post I'm planning on publishing in January