Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: workflows hono app #1093

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

chore: workflows hono app #1093

wants to merge 10 commits into from

Conversation

mxkaske
Copy link
Member

@mxkaske mxkaske commented Nov 8, 2024

No description provided.

Copy link

vercel bot commented Nov 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
openstatus-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2024 7:06pm

@mxkaske mxkaske changed the title chore: workflows app chore: workflows honors app Nov 8, 2024
@mxkaske mxkaske changed the title chore: workflows honors app chore: workflows hono app Nov 8, 2024
Copy link

cloudflare-workers-and-pages bot commented Nov 10, 2024

Deploying openstatus-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: d0474a5
Status:🚫  Build failed.

View logs

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 21 out of 36 changed files in this pull request and generated 1 suggestion.

Files not reviewed (15)
  • apps/workflows/.dockerignore: Language not supported
  • apps/workflows/.gitignore: Language not supported
  • apps/workflows/Dockerfile: Language not supported
  • apps/workflows/package.json: Language not supported
  • apps/workflows/tsconfig.json: Language not supported
  • apps/server/src/v1/statusReports/update/post.ts: Evaluated as low risk
  • apps/server/src/v1/statusReports/post.ts: Evaluated as low risk
  • apps/web/src/lib/auth/index.ts: Evaluated as low risk
  • apps/web/src/app/(content)/blog/[slug]/page.tsx: Evaluated as low risk
  • apps/server/src/v1/statusReportUpdates/post.ts: Evaluated as low risk
  • apps/server/src/v1/pageSubscribers/post.ts: Evaluated as low risk
  • apps/workflows/src/cron/checker.ts: Evaluated as low risk
  • apps/workflows/README.md: Evaluated as low risk
  • apps/workflows/src/cron/tinybird.ts: Evaluated as low risk
  • apps/workflows/src/env.ts: Evaluated as low risk


for (const user of users) {
if (user.email) {
await email.sendFollowUp({ to: "[email protected]" });
Copy link
Preview

Copilot AI Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The email is being sent to a hardcoded address. It should be sent to the user's email address.

Suggested change
await email.sendFollowUp({ to: "[email protected]" });
await email.sendFollowUp({ to: user.email });

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mxkaske name and shame by copilot 🤣

import readline from "node:readline";

// Function to prompt user for confirmation
const askConfirmation = async (question: string): Promise<boolean> => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is it?

Copy link
Member Author

@mxkaske mxkaske Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to avoid doing any accidental deletion. We ask for if the DATABASE_URL is correct and that we fetch the user data from that one.

CleanShot 2024-11-19 at 19 52 45@2x

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like it's the script to delete old data?
Can't we move it to a directory script or something?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could run that on cron e.g.! Let's keep it there for now and consider creating a @openstatus/scripts package?

import { Resend } from "resend";
import { FollowUpEmail } from "../emails/followup";

export class EmailClient {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OOP when most of our codebase is functional 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants