feat: ignore api key

This commit is contained in:
Nevo David 2024-03-19 11:20:09 +07:00
parent 4e196145b4
commit ad10b4b329
12 changed files with 48 additions and 29 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

View File

@ -69,7 +69,6 @@
"howitworks",
"emails",
"github",
"providers/how-to-add-provider",
{
"group": "Providers",
"pages": [
@ -78,7 +77,8 @@
"providers/reddit/reddit",
"providers/articles"
]
}
},
"providers/how-to-add-provider"
]
}
],

View File

@ -42,7 +42,7 @@ And add the new DTO.<br /><br />
Head to `libraries/nestjs-libraries/src/dtos/posts/create.post.dto.ts`<br />
look for the discriminator and add another line in the format of<br />
```typescript
```typescript create.post.dto.ts
{ value: DTOClassName, name: 'providerName' },
```
@ -50,9 +50,8 @@ look for the discriminator and add another line in the format of<br />
And create a new provider file `providerName.provider.ts`<br />
The content of the file should look like this:
### For oAuth2 providers
```typescript
<CodeGroup>
```typescript For oAuth2 providers
import {
AuthTokenDetails,
PostDetails,
@ -84,11 +83,8 @@ export class XProvider implements SocialProvider {
}
}
```
Take a look at the exising providers to see how to implement the methods.
### For Token providers
```typescript
```typescript For Token providers
import { ArticleProvider } from '@gitroom/nestjs-libraries/integrations/article/article.integrations.interface';
export class DevToProvider implements ArticleProvider {
@ -103,6 +99,9 @@ export class DevToProvider implements ArticleProvider {
}
}
```
</CodeGroup>
Take a look at the exising providers to see how to implement the methods.
### Custom functions
You might want to create custom functions for the providers for example: get available orgs, get available pages, etc.<br />
@ -121,7 +120,7 @@ Create a new folder with the providerName<br />
Add a new file `providerName.provider.tsx`<br />
The content of the file should look like this:
```typescript
```typescript providerName.provider.tsx
import { FC } from 'react';
import { withProvider } from '@gitroom/frontend/components/launches/providers/high.order.provider';
import { useSettings } from '@gitroom/frontend/components/launches/helpers/use.values';
@ -168,6 +167,6 @@ You can look at the other integration to understand what data to put inside.
2. Open `apps/frontend/src/components/launches/providers/show.all.providers.tsx`
And add the new provider to the list.
```typescript
```typescript show.all.providers.tsx
{identifier: 'providerName', component: DefaultImportFromHighOrderProvider},
```

View File

@ -37,17 +37,17 @@ docker run --name redis -p 6379:6379 -d redis
## Installation
### Clone the repository
```bash
<Steps>
<Step title="Clone the repository">
```bash Terminal
git clone https://github.com/gitroomhq/gitroom
```
</Step>
### Copy environment variables
<Step title="Copy environment variables">
Copy the `.env.example` file to `.env` and fill in the values
```bash
```bash .env
DATABASE_URL="postgres database URL"
REDIS_URL="redis database URL"
JWT_SECRET="random string for your JWT secret, make it long"
@ -72,25 +72,27 @@ CLOUDFLARE_BUCKETNAME="Cloudflare R2 Bucket Name"
CLOUDFLARE_BUCKET_URL="Cloudflare R2 Backet URL"
NX_ADD_PLUGINS=false
```
</Step>
### Install the dependencies
<Step title="Install the dependencies">
```bash
```bash Terminal
npm install
```
</Step>
### Generate the prisma client and run the migrations
```bash
<Step title="Generate the prisma client and run the migrations">
```bash Terminal
npm run prisma-db-push
```
</Step>
### Run the project
```bash
<Step title="Run the project">
```bash Terminal
npm run dev
```
</Step>
</Steps>
You have to follow all the tabs in the "Developers" menu to install Gitroom
<CardGroup cols={2}>

View File

@ -2,4 +2,9 @@
title: Analytics
---
![Analytics](/images/screens/analytics.png)
**The analytics page allows you to:**
- Monitor the amount of stars you get every day
- Let you know when was the last GitHub trending feed refresh and when the next one will be
- Cross-reference between the number of stars you got and the launch that caused it

View File

@ -2,4 +2,8 @@
title: Billing
---
![Billing](/images/screens/billing.png)
**The settings page allows you to:**
- Add GitHub repositories you would like to track in the analytics page
- <strong>[PRO Tier / Self-hosted]</strong> Invite team members to your organization to collaborate with you

View File

@ -2,3 +2,8 @@
title: Settings
---
![Settings](/images/screens/settings.png)
**The settings page allows you to:**
- Add GitHub repositories you would like to track in the analytics page
- <strong>[PRO Tier / Self-hosted]</strong> Invite team members to your organization to collaborate with you

View File

@ -1,11 +1,15 @@
import { Injectable } from '@nestjs/common';
import { Resend } from 'resend';
const resend = new Resend(process.env.RESEND_API_KEY);
const resend = new Resend(process.env.RESEND_API_KEY || 're_132');
@Injectable()
export class EmailService {
async sendEmail(to: string, subject: string, html: string) {
if (!process.env.RESEND_API_KEY) {
console.log('No Resend API Key found, skipping email sending');
return;
}
await resend.emails.send({
from: 'Gitroom <no-reply@gitroom.com>',
to,

View File

@ -1,7 +1,6 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"forceConsistentCasingInFileNames": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,

View File

@ -3,6 +3,7 @@
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"declaration": true,
"esModuleInterop": true,
"types": ["node"]
},
"include": ["src/**/*.ts"],