Skip to content

Conversation

@Jercik
Copy link
Owner

@Jercik Jercik commented Jan 14, 2026

Summary

  • Sync pr-review-axrun.yml workflow with latest version
  • Adds npm hardening: force registry, enforce TLS, ignore user config
  • Update AGENTS.md

Sync workflow with latest changes from review-tests.
Adds npm hardening: force registry, enforce TLS, ignore user config.
Copilot AI review requested due to automatic review settings January 14, 2026 11:48
Copy link

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.

Pull request overview

This PR synchronizes the pr-review-axrun.yml workflow with the latest version and updates documentation in AGENTS.md to use consistent date handling patterns.

Changes:

  • Added npm security hardening configuration (registry enforcement, TLS requirements, user config isolation)
  • Updated AGENTS.md code examples to use new Date() instead of Date.now() for consistency
  • Pinned axinstall and axrun packages to @latest versions

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/pr-review-axrun.yml Added npm hardening environment variables and pinned package versions to @latest for both axinstall and axrun commands
AGENTS.md Updated code examples to use new Date() instead of Date.now() for date comparisons

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

function sendUserExpiryEmail(): void {
for (const user of db.getUsers()) {
if (user.subscriptionEndDate > Date.now()) continue;
if (user.subscriptionEndDate > new Date()) continue;
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

Comparing a date property directly with new Date() may fail if user.subscriptionEndDate is a number (timestamp). The original Date.now() returned a number, but new Date() returns a Date object. If subscriptionEndDate is stored as a timestamp number, this comparison will not work as intended. Consider using new Date().getTime() or keeping Date.now() for numeric timestamp comparisons.

Suggested change
if (user.subscriptionEndDate > new Date()) continue;
if (user.subscriptionEndDate > Date.now()) continue;

Copilot uses AI. Check for mistakes.
// Imperative shell - handles side effects
email.bulkSend(
generateExpiryEmails(getExpiredUsers(db.getUsers(), Date.now())),
generateExpiryEmails(getExpiredUsers(db.getUsers(), new Date())),
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

Passing new Date() instead of Date.now() changes the parameter type from number to Date object. If getExpiredUsers expects a numeric timestamp, this will cause a type mismatch. Verify that the function signature accepts a Date object, or use new Date().getTime() to maintain backward compatibility.

Copilot uses AI. Check for mistakes.
@Jercik Jercik merged commit 03e4936 into main Jan 14, 2026
3 of 7 checks passed
@Jercik Jercik deleted the feat/update-pr-review-workflow branch January 14, 2026 12:08
@github-actions
Copy link

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants