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

Repo Gardening / Slack messages: detect when a message cannot be delivered #40366

Closed
jeherve opened this issue Nov 27, 2024 · 0 comments · Fixed by #40369
Closed

Repo Gardening / Slack messages: detect when a message cannot be delivered #40366

jeherve opened this issue Nov 27, 2024 · 0 comments · Fixed by #40369
Assignees
Labels
[Action] Repo Gardening Github Action: manage PR and issues in your Open Source project [Pri] Normal [Type] Task

Comments

@jeherve
Copy link
Member

jeherve commented Nov 27, 2024

We currently do not do anything special with our requests to post Slack messages:

await sendSlackMessage(
`An external contributor submitted this PR. Be sure to go welcome them! 👏`,
channel,
payload
);

Since we're posting to more and more channels, it would be nice to detect when a request has failed (for example because a channel has been archived) and warn the team in charge of the Repo Gardening action so they can update the channels where messages get posted.

Slack's API surfaces that info quite nicely:
https://api.slack.com/methods/chat.postMessage
is_archived


Related conversation:
p1732723599754299-slack-C05KLDWRGAX

@jeherve jeherve added [Action] Repo Gardening Github Action: manage PR and issues in your Open Source project [Pri] Normal [Type] Task labels Nov 27, 2024
@jeherve jeherve self-assigned this Nov 27, 2024
jeherve added a commit that referenced this issue Nov 27, 2024
Fixes #40366

Until now, we used to try to send messages to Slack, and didn't do anything if the message could not be sent. We'll now log the message, either by sending a Slack message to myself, or the Quality team for folks outside of the Automattic organization.

This will allow us to better detect triage Slack actions that could not be completed, because a team no longer exists and their Slack channel has been archived for example.
jeherve added a commit that referenced this issue Nov 28, 2024
Fixes #40366

Until now, we used to try to send messages to Slack, and didn't do anything if the message could not be sent. We'll now log the message, either by sending a Slack message to myself, or the Quality team for folks outside of the Automattic organization.

This will allow us to better detect triage Slack actions that could not be completed, because a team no longer exists and their Slack channel has been archived for example.

This also changes the Slack messaging utility to use Slack's own package instead of fetch, to give us more access to Slack's error management tools.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Action] Repo Gardening Github Action: manage PR and issues in your Open Source project [Pri] Normal [Type] Task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant