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.
Possible issues docs
- Cannot submit time: see docs
Installing application
- Access the App public page
- Install the App under your organization
- Invite the @pr-time-tracker into your organization and make him an owner
- To customize the included repositories, go to "Settings" -> "GitHub Apps"
Connect the installed organization with the Tracker flow
- 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
- 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
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
- Download the environment variables via
npm run pre-dev
script
Dev Steps
- Use the
.env
NPM_RC
variable to bind your .npmrc
file or copy the .nrpc.example
and replace with the related token
- Install all dependencies via
pnpm
- 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