Skip to content

Latest commit

 

History

History
89 lines (61 loc) · 3.15 KB

README.md

File metadata and controls

89 lines (61 loc) · 3.15 KB

PR Time Tracker

PR Time Tracker is a GitHub bot that tracks core developer activity related to PRs and issues. This repository contains the user-facing part of the application. The bot's webhook handling code is located in the pr-time-tracker-webhooks repository.

Contributing

If you want to contribute, please follow the Holdex Developer Guidelines.

Documentation

  1. Troubleshooting: Cannot submit time

Installation

  1. Visit the PR Time Tracker App page on GitHub
  2. Install the app in your organization
  3. Invite @pr-time-tracker to your organization and grant owner permissions
  4. To manage repository access, go to "Settings" -> "GitHub Apps"

Connecting Your Organization

To connect your organization with the Time Tracker, contact the Holdex Team to add your project's information to the pr-time-tracker-webhooks repository configuration:

{
  "name": "org_slug",
  "nodeId": "oracle_project_id"
}

Configuration parameters:

  • name: Your GitHub organization slug
  • nodeId: Holdex Oracle project ID (use 337c06eb for HX project column if no specific project is defined)

Available Scripts

  • postinstall: Sets up Husky for Git hooks
  • pull-env: Pulls environment variables for development
  • dev: Starts the development server (port 3000)
  • build: Builds the project
  • preview: Previews the production build
  • format: Formats code using Prettier (with Svelte and Pug plugins)
  • lint: Lints code using ESLint (JavaScript, TypeScript, Svelte, and CommonJS)
  • check: Syncs SvelteKit and validates TypeScript configuration
  • type-check: Performs TypeScript type checking
  • check:watch: Watches for changes while checking TypeScript and syncing SvelteKit
  • proxy: Creates an ngrok tunnel with a specific domain for development

Local Development

Prerequisites

  1. Git
  2. Node.js
  3. pnpm

Basic Setup

  1. Clone this repository
  2. Install dependencies: pnpm install
  3. Pull environment variables: pnpm pull-env

Additional Configuration

The application requires two environment variables for the check-run retrigger functionality:

  • TRIGGER_SERVER_URL
  • TRIGGER_SERVER_SECRET

These variables are not generated by the pull-env script. You have two options:

  1. Full Functionality Setup:

    • Set up pr-time-tracker-webhooks locally
    • Add to .env:
      TRIGGER_SERVER_URL=<your-local-webhook-server-url>
      TRIGGER_SERVER_SECRET=<your-local-webhook-secret>
      
  2. Partial Functionality Setup:

    • Comment out the code that uses these variables if you don't need the check-run retrigger feature

Running the Application

  1. Start the proxy: pnpm proxy (required for GitHub login)
  2. Start the development server: pnpm dev
  3. Visit the app at https://alert-seemingly-moccasin.ngrok-free.app