{"id":15140175,"url":"https://github.com/tspascoal/repo-role-switcher","last_synced_at":"2026-01-04T10:34:22.223Z","repository":{"id":196231823,"uuid":"694768821","full_name":"tspascoal/repo-role-switcher","owner":"tspascoal","description":"pro","archived":false,"fork":false,"pushed_at":"2024-09-21T06:24:29.000Z","size":411,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-30T19:13:06.357Z","etag":null,"topics":["probot","probot-app","sample-app"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tspascoal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-09-21T16:48:23.000Z","updated_at":"2024-12-16T20:05:33.000Z","dependencies_parsed_at":"2024-09-26T08:01:39.290Z","dependency_job_id":null,"html_url":"https://github.com/tspascoal/repo-role-switcher","commit_stats":{"total_commits":5,"total_committers":2,"mean_commits":2.5,"dds":"0.19999999999999996","last_synced_commit":"72ac07cebb0a0524b9fc301292b52eed54fddd31"},"previous_names":["tspascoal/repo-role-switcher"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tspascoal%2Frepo-role-switcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tspascoal%2Frepo-role-switcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tspascoal%2Frepo-role-switcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tspascoal%2Frepo-role-switcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tspascoal","download_url":"https://codeload.github.com/tspascoal/repo-role-switcher/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237852456,"owners_count":19376687,"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":["probot","probot-app","sample-app"],"created_at":"2024-09-26T08:01:33.583Z","updated_at":"2025-10-23T15:31:46.314Z","avatar_url":"https://github.com/tspascoal.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# repo-role-switcher\n\n\u003e A GitHub App built with [Probot](https://github.com/probot/probot) that performs two functions:\n\n- When a repository is created, it adds a (configurable) team to the repository with a given role (built in or custom)\n- When a user or team is added to a repository (or role is changed) to a certain role it automatically changes it to another (effectively upgrading or downgrading a role).\n\n\u003e *Warning*\n\u003e This **is just a sample** and it's not production ready code. For simplicity it doesn't has error handle and doesn't handle rate limits.\n\n\u003e *Note*\n\u003e This is the worst named application in the world.\n\n## Configuration\n\nThe app is configured with the following environment variables:\n\n- `ROLE_TO_SWITCH` - The role to switch (e.g. `maintainer`). Default value is `mantain`.\n- `ROLE_TO_SWITCH_TO` - The role to switch to (e.g. `admin`). Default value is `mantain-plus`.\n- `ADD_TEAM_SLUG` - The team to add to the newly created repository (e.g. `my-team`). Default value is `security-alerts-team`.\n\n## Setup\n\n```sh\n# Install dependencies\nnpm install\n\n# Run the bot\nnpm run build\nnpm start\n```\n\n## Docker\n\n```sh\n# 1. Build container\nnpm run build\ndocker build -t repo-role-switcher .\n\n# 2. Start container\ndocker run -e APP_ID=\u003capp-id\u003e -e PRIVATE_KEY=\u003cpem-value\u003e repo-role-switcher\n```\n\n## License\n\n[ISC](LICENSE) © 2023 Tiago Pascoal\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftspascoal%2Frepo-role-switcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftspascoal%2Frepo-role-switcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftspascoal%2Frepo-role-switcher/lists"}