{"id":23143612,"url":"https://github.com/digitalinteraction/data-officer","last_synced_at":"2026-04-29T19:06:25.571Z","repository":{"id":48381565,"uuid":"378892537","full_name":"digitalinteraction/data-officer","owner":"digitalinteraction","description":"A central hub for Open Lab information and service status, written in Deno","archived":false,"fork":false,"pushed_at":"2022-12-13T17:03:03.000Z","size":6017,"stargazers_count":0,"open_issues_count":14,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-02T04:37:59.376Z","etag":null,"topics":["api","datahub","deno","twitter-bot","uptimerobot"],"latest_commit_sha":null,"homepage":"https://twitter.com/ol_status","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digitalinteraction.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-21T10:27:50.000Z","updated_at":"2024-11-08T12:31:58.000Z","dependencies_parsed_at":"2023-01-28T13:31:56.514Z","dependency_job_id":null,"html_url":"https://github.com/digitalinteraction/data-officer","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/digitalinteraction/data-officer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalinteraction%2Fdata-officer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalinteraction%2Fdata-officer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalinteraction%2Fdata-officer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalinteraction%2Fdata-officer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitalinteraction","download_url":"https://codeload.github.com/digitalinteraction/data-officer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalinteraction%2Fdata-officer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32439394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","datahub","deno","twitter-bot","uptimerobot"],"created_at":"2024-12-17T15:13:50.953Z","updated_at":"2026-04-29T19:06:25.557Z","avatar_url":"https://github.com/digitalinteraction.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data officer\n\nThis repo is a hub for Open Lab information and service status, written in Deno.\nThe service provides API access to Open Lab information and tweets out fun\nstatus messages to [@ol_status](https://twitter.com/ol_status).\n\n## Development\n\n### Setup\n\nTo develop on this repo you will need to have Docker and Deno (1.23+) installed\non your dev machine and have an understanding of them. This guide assumes you\nhave the repo checked out and are on macOS.\n\n```sh\n# Create an .env then fill in the values\ncp .env.example .env\n\n# Setup local auth (optional)\ncp auth.example.yml auth.yml\n\n# Setup git hooks\n# -\u003e Reset with 'git config --unset core.hooksPath'\ngit config --replace-all core.hooksPath .git_hooks\n```\n\n### Regular use\n\nThese are the commands you'll regularly run to develop the API, in no particular\norder.\n\n```sh\n# cd to/this/folder\n\n# Run the automated tests\n# -\u003e Use this rather than `deno test` to ensure deno permissions are set\n./scripts/test.sh\n\n# Run the docker stack\n# -\u003e starts a redis container on localhost:6379\n# -\u003e Make sure to stop after development with 'docker-compose stop'\ndocker-compose up -d\n\n# Run the server locally\n# -\u003e Set --port if you like (default: 3000)\n# -\u003e Reads in environment variables from .env\n./cli.ts serve\n\n# Generate an authentication token for API development\n# Args:\n#   --scope gives specific permissions (use `admin` for all)\n#   --subject is the name of the token (wip not used)\n#   --expire tells the token to expire in a timeframe, e.g. `60m` (encouraged)\n./scripts/get_jwt.ts\n\n# Bump the app's version, must be run with a semantic version\n# -\u003e commits as X.Y.Z\n# -\u003e tags as vX.Y.Z\n./scripts/version.ts X.Y.Z\n\n# Request a token from the endpoint\nTOKEN=...\nhttp :8080/admin/token \\\n  \"Authorization:Bearer $TOKEN\"\n  subject=geoff \\\n  scope=\"a b c\" \\\n  expiresIn=5m\n```\n\n\u003e Most of the scripts in [scripts](/scripts) accept a `--help` option.\n\n### Code formatting\n\nThis repo is formatted with Deno, your IDE should do this for you automatically.\nYou can run `deno fmt` if you like instead.\n\n\u003e You can ignore a line with `// deno-fmt-ignore` or a file with\n\u003e `// deno-fmt-ignore-file`.\n\n## Release\n\nThis repo uses GitHub actions to build a container when you push a git tag like\n`v1.2.3`.\n\n1. Make sure you are on `main`\n1. Make sure all code is committed\n1. Make sure `example/config` is up-to-date\n1. Update the [CHANGELOG.md](/CHANGELOG.md) to describe new features and bug\n   fixes\n1. Run `./script/version X.Y.Z` with the newly documented version\n1. Push to main\n\n## Deployment\n\nInformation for deploying Data Officer, there is an example Kustomize deployment\nin [examples/config](/examples/config).\n\n### Environment variables\n\nThese are all the environment variables that might need to be set, different\ncommands require different ones. If a variable is missing the process will exit\nwith a status code of 1.\n\n- `GITHUB_TOKEN` — A GitHub personal acccess token to pull commits for\n  `digitalinteraction`\n- `JWT_SECRET` — The secret used to sign and verify JWTs (**required**)\n- `MAIN_MYSQL_URL` — A mysql uri for the main mysql database, i.e. `:3307`\n  (optional)\n- `REDIS_URL` — The URL to connect to Redis\n- `SELF_URL` — The URL where the server is publicly accessible, e.g. for\n  generating Twitter `redirect_uri`s.\n- `SHARED_MYSQL_URL` — A mysql uri for the shared mysql database, e.g. `:3306`\n  (optional)\n- `TWITTER_CLIENT_ID` — A Twitter OAuth2 client id\n- `TWITTER_CLIENT_SECRET` — A Twitter OAuth2 client secret\n- `UPTIME_ROBOT_SECRET` — Pre-shared secret for uptimerobot to tweet\n\n### Scopes\n\nThese scopes are available for tokens\n\n- `admin` — Can perform all endpoints and generate new tokens\n- `ping` — Can ping all services\n- `ping:{service}` — Can ping a specific service, where `{service}` is the URL\n  slug of the service\n- `repos` — Can access all repos\n- `repos:{repo}` — Can access all endpoints for a repo, where `{repo}` is the\n  URL slug of the repository\n- `repos:{repo}:{collection}` — Can access a collection on a repo, where\n  `{collection}` is the slug of the repo's collection\n- `twitter:oauth2` — Can trigger an Twitter OAuth2 flow to authenticate the\n  twitter bot.\n- `repos:coffee-club:members:{member}` — Access consumption for a specific\n  coffee-club member.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalinteraction%2Fdata-officer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitalinteraction%2Fdata-officer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalinteraction%2Fdata-officer/lists"}