ministryofjustice / operations-engineering

This repository is home to the Operations Engineering's tools and utilities for managing, monitoring, and optimising software development processes at the Ministry of Justice. • This repository is defined and managed in Terraform
https://user-guide.operations-engineering.service.justice.gov.uk/
MIT License
12 stars 5 forks source link

Inactive users repo: Create automated Slack messages #2347

Closed NickWalt01 closed 1 year ago

NickWalt01 commented 1 year ago

Background

As part of the Inactive repo, when we automate it more, the idea is to create slack messages to relevant channels to alert users to log into their GH accounts as will be removing users in the near future. The idea of this is to incentivise users to log into GitHub before the automation runs.

Must: When remove users via the automation, raise an alert in the ops eng alert channel that the users have been removed, supply name and github login, this is so the team can check if the user has access to the other tools and so we can then remove if they do, this is the case when leavers have not been reported to the team.

Proposed user journey

Add code that will enable sending Slack messages (as a GH action) when doing the inactive user process to mulitple slack channels where the MoJ and AS Org users will see it ie #ask-operations, #operations-engineering-updates, #analytical-platform-support, #ask-data-engineering, etc

NickWalt01 commented 1 year ago

Have added the slack service into the code, am able to raise a notification in the ops-eng alert channel.

Have added an alert that states which users in the allow list does not exist in one of the two orgs so that they can be manually removed from the allow list.

NickWalt01 commented 1 year ago

Closing ticket. Will not spam other Slack channels. Will use the reminder email via Notify. Will use Slack alerts for the ops-eng team only.