mirror of
https://github.com/reiyua/github-profile-trophy-reiyua-mirror.git
synced 2026-11-17 06:02:09 +11:00
* fix: remove unnecessary xssable text * chore: remove typo * fix: ignored promise * fix: imports can be summarized and the repository already has the typing * fix: cleanup and remove domain * chore: lint * tests: `assert` is deprecated, replace to `with` docs reference: https://lint.deno.land/rules/no-import-assertions * ci: bump checkout and Deno * chore: fix readme tags * refactor: remove unnecessary constructor * chore: remove import duplicate * refactor: replace sort with toSorted https://rules.sonarsource.com/typescript/RSPEC-4043/?search=Array-mutating%20methods%20should%20not%20be%20used%20misleadingly * chore: format
73 lines
1.4 KiB
Markdown
73 lines
1.4 KiB
Markdown
# Contribution Guide
|
|
|
|
## Environment
|
|
|
|
- Deno >= v1.36.1
|
|
- [Vercel](https://vercel.com/)
|
|
- GitHub API v4
|
|
- Docker and Docker compose (optional)
|
|
|
|
## Local Run
|
|
|
|
Create `.env` file to project root directory, and write your GitHub token to the
|
|
`.env` file. Please select the authority of `repo` when creating token.
|
|
|
|
```properties
|
|
GITHUB_TOKEN1=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
|
GITHUB_TOKEN2=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
|
|
|
# if using GitHub Enterprise:
|
|
# (this env var defaults to https://api.github.com/graphql)
|
|
GITHUB_API=https://github.example.com/api/graphql
|
|
```
|
|
|
|
Run local server.
|
|
|
|
```sh
|
|
deno task start
|
|
```
|
|
|
|
You can enable the Redis if you want, but it's not mandatory.
|
|
|
|
```sh
|
|
docker compose up -d
|
|
```
|
|
|
|
Rename `env-example` to `.env`, and change ENABLE_REDIS to true
|
|
|
|
Open localhost from your browser.
|
|
|
|
http://localhost:8080/?username=ryo-ma
|
|
|
|
## Editor config
|
|
|
|
Read the [.editorconfig](./.editorconfig)
|
|
|
|
## Pull Requests
|
|
|
|
Pull requests are always welcome! In general, they should a single concern in
|
|
the least number of changed lines as possible. For changes that address core
|
|
functionality, it is best to open an issue to discuss your proposal first. I
|
|
look forward to seeing what you come up with!
|
|
|
|
## Run deno lint
|
|
|
|
## What to do before contributing
|
|
|
|
### 1. Run deno lint
|
|
|
|
```sh
|
|
deno task lint
|
|
```
|
|
|
|
### 2. Run deno format
|
|
|
|
```sh
|
|
deno task format
|
|
```
|
|
|
|
### 3. Run deno test
|
|
|
|
```sh
|
|
deno task test
|
|
```
|