https://github.com/maxdeviant/danger-proxy
A proxy for using Danger on public repos
https://github.com/maxdeviant/danger-proxy
Last synced: about 1 month ago
JSON representation
A proxy for using Danger on public repos
- Host: GitHub
- URL: https://github.com/maxdeviant/danger-proxy
- Owner: maxdeviant
- License: mit
- Created: 2024-04-11T01:07:38.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2026-01-12T17:23:11.000Z (about 2 months ago)
- Last Synced: 2026-01-12T22:58:42.017Z (about 2 months ago)
- Language: Gleam
- Size: 21.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Danger Proxy
A proxy for using [Danger](https://danger.systems/js/) on public repos.
## Raison d'être
Danger is an awesome tool for automating code review and codifying team norms.
However, setting up Danger to run on a public repository can be a bit tricky to do properly. The main issue stems from ensuring that Danger has a GitHub access token to use to interact with the GitHub API while simultaneously preventing that token from being disclosed to the world.
This turns out to be a bit of a tricky task, especially when you pull requests from forks come into play. Since GitHub Actions do not provide secrets to forks, it presents a challenge in storing the access token securely.
Danger Proxy exists to allow Danger to interface with the GitHub API in a more secure fashion.
Danger Proxy will:
- Proxy all requests to `/github/*` to the GitHub API. The provided GitHub API token will be used for authentication.
- Restrict requests to the list of repositories specified in the `ALLOWED_REPOS` environment variable.
- Restrict requests to the subset of the GitHub API that Danger requires.
## Setup
You will need to provide the following environment variables:
```
SECRET_KEY_BASE=
GITHUB_API_TOKEN=
ALLOWED_REPOS=owner/repo1,owner/repo2
```
## Deployment
Danger Proxy can be easily deployed to [Fly.io](https://fly.io/).
Just make your modifications to [`fly.toml`](./fly.toml) to suit your needs, add the environment variables mentioned in [Setup](#setup), and run `flyctl deploy`.