{"id":22835397,"url":"https://github.com/dxw/scheduling-event-sync","last_synced_at":"2025-08-28T19:23:28.116Z","repository":{"id":37958894,"uuid":"426299789","full_name":"dxw/scheduling-event-sync","owner":"dxw","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-18T03:08:16.000Z","size":352,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-08-18T05:23:13.218Z","etag":null,"topics":["delivery-plus","internal"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/dxw.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,"zenodo":null}},"created_at":"2021-11-09T16:16:04.000Z","updated_at":"2025-08-18T03:08:19.000Z","dependencies_parsed_at":"2024-01-08T13:30:29.525Z","dependency_job_id":"237eb0eb-184f-4f43-82ca-ec67f8665e96","html_url":"https://github.com/dxw/scheduling-event-sync","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dxw/scheduling-event-sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxw%2Fscheduling-event-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxw%2Fscheduling-event-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxw%2Fscheduling-event-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxw%2Fscheduling-event-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dxw","download_url":"https://codeload.github.com/dxw/scheduling-event-sync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxw%2Fscheduling-event-sync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271121782,"owners_count":24702874,"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","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["delivery-plus","internal"],"created_at":"2024-12-12T22:09:40.274Z","updated_at":"2025-08-19T08:33:28.449Z","avatar_url":"https://github.com/dxw.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scheduling event sync\n\nAt dxw we use a variety of different systems for tracking things like holiday\nand sickness, support rotas, and project scheduling. This project automates\nsynchronising those different systems.\n\nWithin dxw this project is deployed and run on Heroku. Due to the sensitive\nnature of the data, only a handful of people have access to it.\n\n## Manual usage\n\nNormally you should be running this on a schedule eg on Heroku, but in case you\nneed to run a task manually:\n\n1. Install the dependencies via Bundler:\n\n   ```\n   $ bundle install\n   ```\n\n2. Set up your environment variables by copying `.env.example` to `.env` and\n   filling in the blanks.\n\n### Sync BreatheHR to Productive\n\n```\n$ bundle exec rake breathe:to_productive\n```\n\nNote that this is a destructive operation. It works by looking at the current\nstate of the managed events in BreatheHR and updates Productive to match them by\nremoving any existing events in Productive that don't exist in BreatheHR, and\ncreating new events when they exist in BreatheHR but not Productive.\n\n#### Changing the start date\n\nBy default, the sync task considers all events that intersect with the last 90\ndays. If you'd like to specify a different start date, do so by passing an\nargument into the task.\n\n```\n$ bundle exec rake 'breathe:to_productive[2020-01-01]'\n```\n\n#### Specifying the accounts to synchronise\n\nBy default, the task runs for all the people records in BreatheHR. If you want\nto sync specific people's records, do so by passing an EMAILS environment\nvariable to the task, containing the comma-separated emails.\n\n```\n$ bundle exec rake breathe:to_productive EMAILS=someone@dxw.com,sometwo@dxw.com\n```\n\n## Developing\n\nRunning the tests:\n\n```\n$ bundle exec rspec lib\n```\n\n## Debugging\n\nSometimes the synchronisation can go wrong, and we need to investigate why.\nVery few people have API access to BreatheHR, and those people tend to have very\nlittle time. In order to make the most out of their limited time, we have a couple of\ntasks that make it easier to work with the data.\n\n### Exporting data from BreatheHR\n\nAlso known as a data dump. This tasks exports the event data from BreatheHR, so whoever\nis debugging the app can request it from a person with access and work off the outputted\nfiles.\n\nThe task takes as arguments a list of emails (separated with **semicolons**)\nand (optionally) the earliest date to look up events from in YYYY-MM-DD format.\n\nExample usage:\n\n```\n$ bundle exec rake breathe:data_dump[\"example1@example.org;example2@example.org\",\"2022-07-01\"]\n```\n\nNote: for some shells, such as zsh, you might have to escape the square brackets, e.g.\n\n```\n$ bundle exec rake breathe:data_dump\\[\"example1@example.org;example2@example.org\",\"2022-07-01\"\\]\n```\n\nIf no emails are given, it will export data for all people records in Breathe, and if no\nstarting date is given a default date will be used (currently 90 days before the current\ndate).\n\n### Executing a dry run of synchronising data from files into Productive\n\nRequires:\n\n- Productive API credentials (read access is sufficient)\n- Data dumps in the format produced by the previous task to be present in the local folder\n`tmp/data/breathe/`\n\nExample usage:\n\n```\n$ bundle exec rake breathe:to_productive_from_dump\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdxw%2Fscheduling-event-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdxw%2Fscheduling-event-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdxw%2Fscheduling-event-sync/lists"}