Skip to content

bytegun/pr-time-tracker

 
 

Repository files navigation

PR Time Tracker

PR Time Tracker automates invoice generation processes and tracks core developer activity related to PRs and issues.

Contributing

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

Installing application

  1. Access the App public page
  2. Install the App under your organization
  3. Invite the @pr-time-tracker into your organization and make him an owner
  4. To customize the included repositories, go to "Settings" -> "GitHub Apps"

Connect the installed organization with the Tracker flow

  1. Add a record of your organization info in the Vercel env APP_INTEGRATIONS_LIST
  { "id": "org_id", "name": "org_slug", "nodeId": "oracle_project_id"}

Where:

  • id is the identifier used for defining jobs (can be any string)
  • name - the GitHub organization slug
  • nodeId - Holdex Oracle project ID, if no project is defined, use explicit value 337c06eb for HX project column
  1. Re-deploy the current production build so changes can take effect.

Scripts

  • postinstall: Sets up Husky for Git hooks.
  • pre-dev: Executes a script to pull environment variables before starting development.
  • dev: Starts the development server on port 3000 after executing the pre-dev script.
  • build: Builds the project.
  • preview: Previews the build.
  • format: Formats the code using Prettier with plugins for Svelte and Pug.
  • lint: Lints the codebase using ESLint with support for JavaScript, TypeScript, Svelte, and CommonJS. check: Syncs Svelte kit and checks the TypeScript configuration.
  • type-check: type checks the TypeScript files without emitting any output.
  • check:watch: Watches for changes and syncs Svelte kit while checking TypeScript.
  • proxy: Sets up ngrok to proxy requests to the development server with a specific domain.

Local development

Requirements

  • Docker
  • telebit

Pre-requirements link

  • Start the proxy server for npm run trigger-dev:proxy
  • Use the forwarding URL that telebit gave you for the LOGIN_ORIGIN and API_ORIGIN environment variables for the docker container.
  • cd container and run docker compose up, then wait for the container to run the configuration

Dev Steps

  • Install all dependencies via pnpm
  • Download the development variables via npm run pre-dev
  • Define a development endpoint in Trigger dev UI with the address https://alert-seemingly-moccasin.ngrok-free.app/api/trigger
  • Add your Trigger dev env variables from the self-hosted UI into the .env file
TRIGGER_API_KEY="api_key"
TRIGGER_API_URL="same as LOGIN_ORIGIN"
TRIGGER_PROJECT_ID="project_id"
  • Update the project_id also in the package.json file
  • Start the development server on port 3000 via pnpm|npm|yarn run dev-only
  • Start the proxy connection via npm run proxy
  • To connect to the DB via MongoDB Compass use the env variable MONGOGB_URI

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 80.6%
  • Svelte 14.5%
  • JavaScript 3.2%
  • SCSS 1.6%
  • Other 0.1%