Skip to content

docs: add JSDoc block to re-engagement cron route - #1371

Open
DishiGpt wants to merge 2 commits into
Ixotic27:mainfrom
DishiGpt:1202-jsdoc-re-engagement-route
Open

docs: add JSDoc block to re-engagement cron route#1371
DishiGpt wants to merge 2 commits into
Ixotic27:mainfrom
DishiGpt:1202-jsdoc-re-engagement-route

Conversation

@DishiGpt

@DishiGpt DishiGpt commented Aug 4, 2026

Copy link
Copy Markdown

What does this PR do?

Adds a complete JSDoc comment block above the exported GET handler in
src/app/api/cron/re-engagement/route.ts. The function previously had only
an @param annotation with no description. The new JSDoc block documents:

  • The route's purpose (cron job that sends re-engagement emails)
  • The Bearer CRON_SECRET authentication check
  • The @param for the NextRequest parameter
  • The @returns shape of the JSON response

Follows the JSDoc style/pattern used in
src/app/api/cron/flush-batches/route.ts. This is a documentation-only
change — no logic was modified.

Related issue

Fixes #1202

Screenshots

N/A — documentation-only change, no visual/UI impact.

Checklist

  • npm run lint passes
  • Tested locally
  • No secrets or .env values committed
  • I acknowledge that an automated AI Reviewer will perform a preliminary review of this PR.
  • I have starred this repository!

Copilot AI lite review requested due to automatic review settings August 4, 2026 16:12
@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

@DishiGpt is attempting to deploy a commit to the ixotic27-8245's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

👋 Hey @DishiGpt! Thanks for your contribution! 🎉

It looks like this PR isn't linked to any issue yet.

Please edit your PR description and add a closing keyword so we can track this properly, for example:

Fixes #<issue-number>

💡 You can link multiple issues if needed (e.g. Fixes #12, Closes #34).
If you're working on something that doesn't have an issue yet, please open one first and then link it here.

Once you've updated the PR description the check will re-run automatically. 🙌

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

📋 GSSoC Label Validation Report

All label requirements met. This PR passes the pre-merge label check.


📖 Label Reference
Category Valid Labels Rules
Approval gssoc:approved Required to score and merge
Difficulty level:beginner / intermediate / advanced / critical Exactly one is required
Quality quality:clean / quality:exceptional Optional (max one); exceptional requires reviewer comment
Type type:bug, type:feature, type:docs, type:testing, type:refactor, type:design, type:accessibility, type:performance, type:devops, type:security At least one is required
Blocking gssoc:invalid, gssoc:spam, gssoc:ai-slop Excludes PR from scoring and blocks merge

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔍 Security Scan: Review Needed

The following patterns were detected in the latest changes:

⚠️ hardcoded secret/key reference — found in 1 added line(s):
* Requires Authorization: Bearer ${CRON_SECRET} to verify the cron request.

A maintainer should review these findings before merging.

Hey @DishiGpt, please review these flagged items! 🛠️

@github-actions github-actions Bot added good first issue Good for newcomers Gssoc 26 Part of GirlScript Summer of Code 2026 gssoc:approved Approved GSSoC contribution level:beginner Beginner difficulty level type:docs Documentation changes or README updates labels Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

👋 Hey @DishiGpt, welcome to The Leetcode City! 🎉

Thanks for opening your first pull request — this is a big deal and we appreciate the effort!

While you wait for a review, please double-check:

  • ✅ You've read the CONTRIBUTING.md checklist
  • npm run lint passes locally
  • ✅ Your PR description includes Fixes #<issue-number>

A maintainer will review your PR shortly. Hang tight! 🚀

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Ready to approve

The change is documentation-only and the remaining feedback is limited to minor wording/clarity adjustments in the new JSDoc.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

Updates documentation for the re-engagement cron route handler by replacing an incomplete JSDoc block with a more descriptive one, aligned with the project’s cron-route documentation approach.

Changes:

  • Expanded the JSDoc block above the exported GET handler for the re-engagement cron route.
  • Documented the Authorization Bearer secret requirement and the expected JSON response shape.
File summaries
File Description
src/app/api/cron/re-engagement/route.ts Enhances the JSDoc for the re-engagement cron GET handler (purpose, auth requirement, and response description).
Review details

Suppressed comments (1)

src/app/api/cron/re-engagement/route.ts:62

  • The @returns description says "on failure", but this handler only explicitly returns { error: string } for auth/config errors; other runtime failures (e.g., unexpected exceptions) would not necessarily match this JSON shape. Narrow the wording so the JSDoc stays strictly accurate.
 * @returns {Promise<NextResponse>} JSON response with `{ ok: true, sent, skipped, errors }` on success,
 * or `{ error: string }` on failure.
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment thread src/app/api/cron/re-engagement/route.ts Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔍 Security Scan: Review Needed

The following patterns were detected in the latest changes:

⚠️ hardcoded secret/key reference — found in 1 added line(s):
* Requires Authorization: Bearer <CRON_SECRET> to verify the cron request.

A maintainer should review these findings before merging.

Hey @DishiGpt, please review these flagged items! 🛠️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers gssoc:approved Approved GSSoC contribution Gssoc 26 Part of GirlScript Summer of Code 2026 level:beginner Beginner difficulty level type:docs Documentation changes or README updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs : add JSDoc to GET handler in re-engagement cron route

2 participants