Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# CODEDDEVS TECHNOLOGY LTD — Code Owners
# All PRs targeting main or dev require review from the repo owner before merging

* @onerandomdevv
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Bug report
about: Something is broken
labels: bug
---

## What is broken?

## Steps to reproduce
1.
2.
3.

## Expected behaviour

## Actual behaviour

## Environment
- Branch:
- Node version:
- Browser (if UI):
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Feature request
about: Suggest something new
labels: enhancement
---

## What do you want to build?

## Why is it needed?

## Acceptance criteria
- [ ]
- [ ]
- [ ]

## Notes
25 changes: 25 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## What does this PR do?
<!-- Brief description of the changes -->

## Type of change
- [ ] Feature
- [ ] Bug fix
- [ ] Config / setup
- [ ] Refactor
- [ ] Docs

## Checklist
- [ ] I have read CLAUDE.md
- [ ] pnpm build passes locally with no errors
- [ ] No TypeScript errors (pnpm tsc --noEmit)
- [ ] No hardcoded secrets or API keys
- [ ] All new API routes check for admin session before executing
- [ ] No UI libraries were installed
- [ ] Fonts are loaded via next/font/google only
- [ ] pnpm was used (not npm or yarn)

## Screenshots (if UI changes)
<!-- Add screenshots here if this PR touches any frontend pages -->

## Notes for reviewer
<!-- Anything the reviewer should know -->
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev

jobs:
ci:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

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

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

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

- name: TypeScript check
run: pnpm tsc --noEmit

- name: ESLint
run: pnpm eslint src/ --ext .ts,.tsx --max-warnings 0

- name: Build check
run: pnpm build
env:
DATABASE_URL: postgresql://dummy:dummy@dummy/dummy
DATABASE_URL_UNPOOLED: postgresql://dummy:dummy@dummy/dummy
NEXTAUTH_SECRET: dummy-secret-for-ci-only-not-real
NEXTAUTH_URL: http://localhost:3000
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME: dummy
NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET: dummy
CLOUDINARY_API_KEY: dummy
CLOUDINARY_API_SECRET: dummy
RESEND_API_KEY: dummy
CONTACT_NOTIFICATION_EMAIL: ci@dummy.com
22 changes: 22 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Preview

on:
pull_request:
branches:
- main

jobs:
preview:
runs-on: ubuntu-latest

steps:
- name: Comment preview status
uses: actions/github-script@v7
with:
script: |
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: "✅ CI passed. Vercel preview deployment will be available shortly.",
});
Comment on lines +3 to +22

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== preview workflow trigger and message ==="
sed -n '1,120p' .github/workflows/preview.yml

echo
echo "=== CI workflow name and trigger ==="
sed -n '1,140p' .github/workflows/ci.yml

echo
echo "Expected verification result:"
echo "- preview.yml uses 'on: pull_request' and contains 'CI passed' text"
echo "- preview.yml does not gate on ci.yml success (no workflow_run-based trigger)"

Repository: coded-devs/website

Length of output: 2085


Preview workflow unconditionally claims CI passed, even when CI fails.

This workflow runs independently on pull_request events and always posts "✅ CI passed" (Line 21), regardless of the CI workflow status. This can mislead reviewers when actual CI checks are failing.

Suggested fix (safe/low-effort)
-              body: "✅ CI passed. Vercel preview deployment will be available shortly.",
+              body: "🧪 Preview workflow triggered. Vercel preview deployment will be available shortly.",

For accurate messaging, either update the text to not claim CI success, or gate this workflow on CI success via workflow_run triggered on completed+success of the CI workflow.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
on:
pull_request:
branches:
- main
jobs:
preview:
runs-on: ubuntu-latest
steps:
- name: Comment preview status
uses: actions/github-script@v7
with:
script: |
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: "✅ CI passed. Vercel preview deployment will be available shortly.",
});
on:
pull_request:
branches:
- main
jobs:
preview:
runs-on: ubuntu-latest
steps:
- name: Comment preview status
uses: actions/github-script@v7
with:
script: |
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: "🧪 Preview workflow triggered. Vercel preview deployment will be available shortly.",
});
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/preview.yml around lines 3 - 22, The current preview
workflow triggers on "on: pull_request" and the "preview" job's step named
"Comment preview status" always posts the fixed body "✅ CI passed. Vercel
preview deployment will be available shortly.", which is misleading; either
change that step's body text to a neutral message (e.g., "Vercel preview
deployment will be available shortly." or "Preview job started; check CI status
for pass/fail.") replacing the existing body string, or gate the workflow to run
only after the CI workflow succeeds by replacing the trigger with a workflow_run
trigger for the CI workflow (completed + conclusion: "success") so the comment
only runs when CI passed; update the step (still named "Comment preview status")
accordingly if you gate the run.

Loading
Loading