{"id":18141388,"url":"https://github.com/hpedrorodrigues/disturbed_cli","last_synced_at":"2026-04-28T11:04:29.992Z","repository":{"id":258709038,"uuid":"873916328","full_name":"hpedrorodrigues/disturbed_cli","owner":"hpedrorodrigues","description":"CLI that update users in Slack user groups based on OpsGenie on-call schedules.","archived":false,"fork":false,"pushed_at":"2025-03-17T14:51:34.000Z","size":163,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T04:33:03.904Z","etag":null,"topics":["oncall","opsgenie","slack"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hpedrorodrigues.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-17T00:13:16.000Z","updated_at":"2025-03-17T14:51:38.000Z","dependencies_parsed_at":"2024-10-22T10:13:26.028Z","dependency_job_id":null,"html_url":"https://github.com/hpedrorodrigues/disturbed_cli","commit_stats":null,"previous_names":["hpedrorodrigues/disturbed_cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpedrorodrigues%2Fdisturbed_cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpedrorodrigues%2Fdisturbed_cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpedrorodrigues%2Fdisturbed_cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hpedrorodrigues%2Fdisturbed_cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hpedrorodrigues","download_url":"https://codeload.github.com/hpedrorodrigues/disturbed_cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247528773,"owners_count":20953482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["oncall","opsgenie","slack"],"created_at":"2024-11-01T17:06:38.222Z","updated_at":"2026-04-28T11:04:29.958Z","avatar_url":"https://github.com/hpedrorodrigues.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Disturbed CLI\n\nSimple CLI that update users in Slack user groups based on OpsGenie on-call schedules.\n\n\u003e Note: It's intended to be run as a cron job.\n\n## Configuration\n\n### Environment variables\n- `DISTURBED_OPSGENIE_API_KEY`: API key used to fetch schedules in OpsGenie.\n  - It needs `Read` and `Configuration Access` access rights.\n  - You can read this [page](https://support.atlassian.com/opsgenie/docs/api-key-management/) to learn how to create an API key.\n- `DISTURBED_SLACK_API_TOKEN`: Bot Token used to fetch users, user groups and update use groups.\n  - It needs `users:read`, `users:read.email`, `usergroups:read` and `usergroups:write` scopes.\n  - You can read this [page](https://api.slack.com/tutorials/tracks/getting-a-token) to quickly get a Slack Bot Token.\n  - Remember to review your workspace permissions for User Groups. It must allow users to update user groups (for more details, [see](https://api.slack.com/methods/usergroups.users.update#markdown)).\n- `DISTURBED_CONFIG_FILE` [not required]: Path to the configuration file. Defaults to `config.yaml`.\n- `DISTURBED_LOG_LEVEL` [not required]: Logging level to use in the project.\n  - It's based on [Python's logging levels](https://docs.python.org/3/library/logging.html#logging-levels).\n\n### Configuration file\n\n```yaml\nschedules_mapping:\n    # Schedule name in OpsGenie to fetch who's on-call.\n  - schedule_name: ''\n    # User group name in Slack to be updated based on the OpsGenie schedule.\n    user_group_name: ''\n\n    # Optional. Overrides OpsGenie schedules based on the given config.\n    overrides:\n        # Email of the user that's on-call.\n      - user_email: ''\n        # Current time (in the given timezone) must be within the given time range. Format: HH:MM:SS.\n        timezone: ''\n        starts_on: ''\n        ends_on: ''\n        # Optional. Defaults to all_days.\n        # Days that should be considered to override. Possible values:\n        # - all_days\n        # - weekdays\n        # - weekends\n        repeats_on: ''\n        # Update the user group in Slack with the given users instead of the one that's on-call.\n        replace_by:\n          - ''\n```\n\n**Example**\n\n\u003cdetails open\u003e\n\u003csummary\u003econfig.yaml\u003c/summary\u003e\n\n```yaml\nschedules_mapping:\n  - schedule_name: product\n    user_group_name: 'product-oncall'\n  - schedule_name: sre\n    user_group_name: 'sre-oncall'\n    overrides:\n      - user_email: john.doe@gmail.com\n        timezone: 'America/Fortaleza'\n        starts_on: '13:00:00'\n        ends_on: '18:00:00'\n        repeats_on: weekdays\n        replace_by:\n          - jane.doe@gmail.com\n```\n\u003c/details\u003e\n\n![Slack Demo](./.github/assets/slack_demo.png)\n\n### Docker image\n\nThere is a Docker image you can use to run this project.\n\ne.g.,\n\n```bash\ndocker run \\\n  -e DISTURBED_OPSGENIE_API_KEY='\u003capi-key\u003e' \\\n  -e DISTURBED_SLACK_API_TOKEN='\u003cbot-token\u003e' \\\n  -v ./config.yaml:/app/config.yaml \\\n  ghcr.io/hpedrorodrigues/disturbed_cli:\u003cversion\u003e\n```\n\n### Helm chart\n\nHelm chart is available [here](https://github.com/hpedrorodrigues/helm-charts/tree/main/charts/disturbed-cli).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhpedrorodrigues%2Fdisturbed_cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhpedrorodrigues%2Fdisturbed_cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhpedrorodrigues%2Fdisturbed_cli/lists"}