Skip to content

Commit

Permalink
🔥 Removed all unowned repositories code (#4993)
Browse files Browse the repository at this point in the history
  • Loading branch information
PepperMoJ authored Nov 12, 2024
1 parent 3501a0b commit e1f07d1
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 329 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/job-alarm-unowned-repository.yaml

This file was deleted.

88 changes: 0 additions & 88 deletions bin/unowned_repositories.py

This file was deleted.

9 changes: 0 additions & 9 deletions services/slack_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,6 @@ def send_undelivered_email_alert_to_operations_engineering(
blocks = self._create_block_with_message(message)
self._send_alert_to_operations_engineering(blocks)

def send_unowned_repos_slack_message(self, repositories: list):
message = (
f"*Unowned Repositories Automation*\n\n"
f"Repositories on the GitHub Organisation that have no team or collaborator:\n"
f"{repositories}"
)
blocks = self._create_block_with_message(message)
self._send_alert_to_operations_engineering(blocks)

def send_alert_for_poc_repositories(self, repositories):
message = (
"The following POC GitHub Repositories persist:\n\n"
Expand Down
177 changes: 0 additions & 177 deletions test/test_bin/test_unowned_repositories.py

This file was deleted.

22 changes: 0 additions & 22 deletions test/test_services/test_slack_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,28 +477,6 @@ def test_send_github_rejoin_report(self):
)


@patch("slack_sdk.WebClient.__new__")
class SendUnownedReposAlertToOperationsEngineering(unittest.TestCase):

def test_downstream_services_called(self, mock_slack_client: MagicMock):
repos = ["some-repo1", "some-repo2", "some-repo3"]
SlackService(
"").send_unowned_repos_slack_message(repos)
mock_slack_client.return_value.chat_postMessage.assert_called_with(
channel="C033QBE511V",
mrkdown=True,
blocks=[
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": '*Unowned Repositories Automation*\n\nRepositories on the GitHub Organisation that have no team or collaborator:\n[\'some-repo1\', \'some-repo2\', \'some-repo3\']'
}
}
]
)


@patch('slack_sdk.WebClient.users_list')
class GetAllSlackUsernamesTest(unittest.TestCase):

Expand Down

0 comments on commit e1f07d1

Please sign in to comment.