Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
chore: v2 🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
ijsKoud authored Apr 14, 2024
2 parents 1a74fc9 + 3b83d9c commit eb0d593
Show file tree
Hide file tree
Showing 149 changed files with 8,288 additions and 7,901 deletions.
11 changes: 0 additions & 11 deletions .commitlintrc.json

This file was deleted.

35 changes: 24 additions & 11 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
DISCORD_BOT_TOKEN="DISCORD BOT TOKEN HERE"
PORT="3000"
API_BASE_URL="YOUR BASE API URL CONNECTED TO THIS APPLICATION"
DATABASE_URL="postgresql://username:password@localhost:5432/database?schema=public"
# Replace username, password, localhost and database with the appropiate values

DEV_SMEE_URL="your https://smee.io url"
DEV_WEBHOOK_URL="Testing webhook"
DEV_GUILD_ID="Testing guild"
DEV_CHANNEL_ID="Testing channel"
GITHUB_WEBHOOK_SECRET="Testing webhook secret"
# .env.development.local, .env.test.local
DATABASE_URL="postgres://USERNAME:PASSWORD@HOST:5432/DATABASE"
NODE_ENV="development"

WEBHOOK_SECRET="SECRET"
ENCRYPTION_KEY="" # 32 character long key

DISCORD_BOT_TOKEN="" # Discord bot token

DEVELOPMENT_GUILD_ID="" # Discord guild Id for testing
DEVELOPMENT_WEBHOOK_ID="" # Discord webhook Id for testing
DEVELOPMENT_WEBHOOK_URL="" # Discord webhook URL for testing

SMEE_URL="" # Smee.io url

# .env.local
DATABASE_URL="postgres://USERNAME:PASSWORD@HOST:5432/DATABASE"
NODE_ENV="production"

ENCRYPTION_KEY="" # 32 character long key
DISCORD_BOT_TOKEN="" # Discord bot token



3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ yarn-error.log*
.vercel

# Config
tsup.config.ts
tsup.config.ts
.eslintrc.js
5 changes: 1 addition & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"extends": ["@sapphire"],
"rules": {
"@typescript-eslint/no-base-to-string": "off"
}
"extends": ["@snowcrystals/eslint-config"]
}
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To work on the project you must do the following:

**1**. Fork and clone the repository, make sure you are in the correct branch in this case the **main** branch.

**2**. Install Yarn (you can use npm as well but this project uses yarn), after that run `yarn install`.
**2**. Install pnpm (you can use npm as well but this project uses pnpm), after that run `pnpm install`.

**3**. Do whatever you want to do (add things, change things, fixed things, etc)

Expand Down
7 changes: 6 additions & 1 deletion .github/readme.ijsblokje.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ version = "1.1.1"

[variables]
information = "A Discord bot which makes your GitHub Discord embeds prettier ✨"
installation = [ "Want to add the bot to your server? [Click here](https://discord.com/api/oauth2/authorize?client_id=1018461517408120842&permissions=536870928&scope=bot%20applications.commands)", "You can also install your own instance, check the .env.example for all the required environment variables.", "### Installation Via Docker", "```bash\ndocker run --name=gitcord -v .env:/gitcord/.env -p 3000:3000 ghcr.io/ijskoud/gitcord\n```" ]
installation = [
"Want to add the bot to your server? [Click here](https://discord.com/api/oauth2/authorize?client_id=1018461517408120842&permissions=536870928&scope=bot%20applications.commands)",
"You can also install your own instance, check the .env.example for all the required environment variables.",
"### Installation Via Docker",
"Copy the `docker/docker-compose.yml` file to your server and run `docker-compose up -d`"
]
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@1b1aada464948af03b950897e5eb522f92603cc2 # v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -54,7 +54,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
uses: github/codeql-action/autobuild@1b1aada464948af03b950897e5eb522f92603cc2 # v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -68,4 +68,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@1b1aada464948af03b950897e5eb522f92603cc2 # v3
74 changes: 47 additions & 27 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: Install Node v18
uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
cache: pnpm

- name: Install Dependencies
run: yarn install --immutable
run: pnpm install --frozen-lockfile

Building:
runs-on: ubuntu-latest
Expand All @@ -29,17 +34,22 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: Install Node v18
uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
cache: pnpm

- name: Install Dependencies
run: yarn install --immutable
run: pnpm install --frozen-lockfile

- name: Run Compiler
run: yarn run build
run: pnpm run build

Linting:
runs-on: ubuntu-latest
Expand All @@ -48,33 +58,43 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: Install Node v18
uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
cache: pnpm

- name: Install Dependencies
run: yarn install --immutable
run: pnpm install --frozen-lockfile

- name: Run Eslint
run: yarn run lint

# Testing:
# runs-on: ubuntu-latest
# needs: Dependencies
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3

# - name: Install Node v18
# uses: actions/setup-node@v3
# with:
# node-version: 18
# cache: yarn

# - name: Install Dependencies
# run: yarn install --immutable

# - name: Run Vitest
# run: yarn run test
run: pnpm run lint

Testing:
runs-on: ubuntu-latest
needs: Dependencies
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: Install Node v18
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Run tests
run: pnpm run test
36 changes: 0 additions & 36 deletions .github/workflows/docker-dev.yml

This file was deleted.

20 changes: 16 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "cd(Docker): Publish stable image"
name: "CD(Docker): Publish stable image"

on:
workflow_dispatch:
Expand All @@ -9,6 +9,18 @@ jobs:
ghcr:
name: Push Image to GitHub Packages
runs-on: ubuntu-latest

strategy:
matrix:
include:
# GitHub bot
- dockerfile: docker/bot.dockerfile
tags: ghcr.io/ijskoud/ijsblokje:bot

# Discord bot
- dockerfile: docker/api.dockerfile
tags: ghcr.io/ijskoud/ijsblokje:api

steps:
- name: Check out the repo
uses: actions/checkout@v4
Expand All @@ -31,6 +43,6 @@ jobs:
uses: docker/build-push-action@v5
with:
push: true
tags: |
ghcr.io/ijskoud/gitcord:v1
ghcr.io/ijskoud/gitcord:latest
context: .
file: ${{ matrix.dockerfile }}
tags: ${{ matrix.tags }}
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
node_modules
/.pnp
.pnp.js

Expand All @@ -14,9 +14,10 @@
/coverage

# next.js
/.next/
/out/
/dist/
.next/
out/
dist/
.turbo

# production
/build
Expand Down
4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

5 changes: 1 addition & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
pnpm lint-staged
3 changes: 3 additions & 0 deletions .lintstagedrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
"**/*.{js,jsx,ts,tsx}": [() => "pnpm lint -- --fix", "prettier --write"]
};
3 changes: 0 additions & 3 deletions .lintstagedrc.json

This file was deleted.

9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"npm.packageManager": "pnpm",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.workingDirectories": [{ "pattern": "./packages/*/" }, { "pattern": "./apps/*/" }]
}
Loading

0 comments on commit eb0d593

Please sign in to comment.