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

This PR introduces a set of workflows that allow us to automatically generate and update new discussions whenever there is a public incident declared within GitHub. This then allows us to centralize discussion without requiring manual intervention from either the incident commander or a community manager. This PR also extends the discussion.rb lib file to support the new workflows. #737

Open
Mohammed-Alanazisa opened this issue Nov 29, 2024 · 0 comments

Comments

@Mohammed-Alanazisa
Copy link

This PR introduces a set of workflows that allow us to automatically generate and update new discussions whenever there is a public incident declared within GitHub. This then allows us to centralize discussion without requiring manual intervention from either the incident commander or a community manager. This PR also extends the discussion.rb lib file to support the new workflows.

Demo & example screenshot

Demo.Incident.Discussion.Automation.mp4

image

Implementation overview

The workflows are meant to work as follows:

open-incident-discussion.yml

This workflow acts upon the incident-declared repository dispatch event. It takes the public title and incident URL from the repository dispatch event and generates the new discussion via the open_incident_discussion action, which will be posted in the Announcements category.

update-incident-discussion.yml

This workflow acts upon the incident-updated repository dispatch event. It uses the URL slug to identify the correct discussion to update, then posts the update message to the relevant discussion as a comment.

post-incident-summary.yml

This workflow acts upon the incident-public-summary repository dispatch event. It again uses the URL slug to identify the correct discussion to update, then uses the post_incident_summary action to add a comment (like the update action) and to mark this new comment as the answer. It also updates the initial post body to include a graphic denoting that this incident has been resolved.

close-incident-discussions.yml

This workflow is different from the rest, as it instead operates on a schedule to satisfy the requirement that the incident discussions are closed ~48 hours after they are opened. It runs two actions; the first, check_open_incident_discussions, which confirms if there are any eligible discussions for closure, and then runs the close_incident_discussions action to close them, ensuring that any discussions that haven't been marked as answered are first marked as answered by finding the last comment by the automation, marking that as the answer, and then closing the discussion.

Considerations & notes

  • There will be a fast-follow PR with the asset URL of the banner image once it has been uploaded to this repo
  • These workflows will not respond to incidents until we update the configuration on GitHub's end to do so, which can be done once this PR has been approved and merged. This will include installing the corresponding GitHub app, incident-discussion-bot, on this repo; this app is used to connect the eventing on GitHub to the workflows in this repo.
  • This PR will be merged once both engineering and community approves, and both are ready for this feature to be live.
  • The final piece of this puzzle is Slack alerting, which can be configured directly after this has been merged.

/cc @queenofcorgis

Originally posted by @alidacodes in community/community#145114

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

No branches or pull requests

1 participant