Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tspascoal/repo-role-switcher
pro
https://github.com/tspascoal/repo-role-switcher
probot probot-app sample-app
Last synced: 3 months ago
JSON representation
pro
- Host: GitHub
- URL: https://github.com/tspascoal/repo-role-switcher
- Owner: tspascoal
- License: isc
- Created: 2023-09-21T16:48:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-21T06:24:29.000Z (4 months ago)
- Last Synced: 2024-09-27T08:02:23.879Z (4 months ago)
- Topics: probot, probot-app, sample-app
- Language: TypeScript
- Homepage:
- Size: 401 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# repo-role-switcher
> A GitHub App built with [Probot](https://github.com/probot/probot) that performs two functions:
- When a repository is created, it adds a (configurable) team to the repository with a given role (built in or custom)
- 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).> *Warning*
> 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.> *Note*
> This is the worst named application in the world.## Configuration
The app is configured with the following environment variables:
- `ROLE_TO_SWITCH` - The role to switch (e.g. `maintainer`). Default value is `mantain`.
- `ROLE_TO_SWITCH_TO` - The role to switch to (e.g. `admin`). Default value is `mantain-plus`.
- `ADD_TEAM_SLUG` - The team to add to the newly created repository (e.g. `my-team`). Default value is `security-alerts-team`.## Setup
```sh
# Install dependencies
npm install# Run the bot
npm run build
npm start
```## Docker
```sh
# 1. Build container
npm run build
docker build -t repo-role-switcher .# 2. Start container
docker run -e APP_ID= -e PRIVATE_KEY= repo-role-switcher
```## License
[ISC](LICENSE) © 2023 Tiago Pascoal