Skip to content

lime-test/limetest-platform

Repository files navigation

This is a Next.js project bootstrapped with create-next-app.

Getting Started

Supabase Setup

  1. Create a Supabase project at supabase.com

  2. Add environment variables to .env.local:

First, run the development server:

pnpm dev

GitHub App Setup

  1. Create a GitHub App at github.com/settings/apps/new with these permissions:
  • Actions: Read & write
  • Checks: Read-only
  • Workflows: Read & write
  • Contents: Read-only
  • Metadata: Read-only
  1. Subscribe to these webhook events:

Required:

  • Workflow job
  • Workflow run
  • Check run
  • Workflow dispatch
  • Repository dispatch
  • Meta
  1. Generate a webhook secret:
# On macOS/Linux
openssl rand -hex 32

# On Windows with PowerShell
[Convert]::ToHexString((1..32 | ForEach-Object { [byte](Get-Random -Minimum 0 -Maximum 256) }))
  1. Add the generated secret to your GitHub App:

    • In the "Webhook" section of your GitHub App settings
    • Paste the generated secret into the "Webhook Secret" field
    • Save changes
  2. Add the same secret to your .env.local file:

GITHUB_WEBHOOK_SECRET=your_generated_secret
  1. Set the Webhook URL in GitHub to:
https://your-domain.com/api/github/webhook
  1. Next add the name of your Github app to your .env.local file:
GITHUB_APP_NAME=lime-test

Add your GitHub App Private Key:

In order to act on behalf of your GitHub app, you need to create a private key when setting up your app. You need to add this private key to your env.local this way:

  1. Start with your original PEM file This is your standard private key file that looks like:
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAuvhXnq...
(many lines of base64 content)
...gIt5dsqY20U/ck7CE9tJYX
-----END RSA PRIVATE KEY-----
  1. Remove the headers and line breaks Extract just the content between the BEGIN and END lines, removing all line breaks: MIIEogIBAAKCAQEAuvhXnq...gIt5dsqY20U/ck7CE9tJYX

  2. Base64 encode this content Use the command line to encode this content:

echo -n "MIIEogIBAAKCAQEAuvhXnq...gIt5dsqY20U/ck7CE9tJYX" | base64

This will give you a single line of base64-encoded text like: TUlJRW9nSUJBQUtDQVFFQXV2aFhucS4uLmdJdDVkc3FZMjBVL2NrN0NFOXRKWVg=

  1. Add this to Vercel as GITHUB_APP_PRIVATE_KEY_BASE64 In your Vercel environment variables, add: GITHUB_APP_PRIVATE_KEY_BASE64=TUlJRW9nSUJBQUtDQVFFQXV2aFhucS4uLmdJdDVkc3FZMjBVL2NrN0NFOXRKWVg=

For local development and your GIthub App Webhook, you can use a tool like ngrok to expose your local server to the internet or deploy to Vercel:

ngrok http 3000

About

Limetest web application and TestOps platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published