Skip to content

Add GitHub Copilot repository instructions#29

Merged
ELMOURABEA merged 2 commits into
mainfrom
copilot/configure-copilot-instructions
Nov 19, 2025
Merged

Add GitHub Copilot repository instructions#29
ELMOURABEA merged 2 commits into
mainfrom
copilot/configure-copilot-instructions

Conversation

Copilot AI commented Nov 19, 2025

Copy link
Copy Markdown
Contributor

Implements .github/copilot-instructions.md to provide Copilot with repository-specific context for code generation and reviews.

Instructions Coverage

  • Architecture: Routes (HTTP handlers) → Services (business logic + external API calls)
  • Security: API key management via env vars, input validation patterns, rate limiting (60 req/min)
  • Code Style: CommonJS, async/await, Prettier (single quotes, 100 char width), ESLint config
  • Testing: Jest patterns with descriptive names, mock external APIs
  • Error Handling: Try-catch with console.error logging, HTTP status codes (400/502/500)
  • Dependencies: Prefer axios for HTTP, express-rate-limit, helmet for security headers

Example Pattern

// routes/example.js
router.post('/', async (req, res) => {
  try {
    const input = req.body?.field;
    if (!input) return res.status(400).json({ error: 'Invalid input' });
    
    const result = await serviceFunction(input);
    res.json(result);
  } catch (err) {
    console.error('Operation failed:', err);
    res.status(502).json({ error: 'Operation failed' });
  }
});

File size: 437 lines (within GitHub's recommended <1000 line limit for optimal Copilot processing).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • gh.io
    • Triggering command: curl -sL REDACTED (dns block)
    • Triggering command: curl -L -v REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>✨ Copilot instructions</issue_title>
<issue_description>Configure instructions for this repository as documented in Best practices for Copilot coding agent in your repository.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: ELMOURABEA <189882272+ELMOURABEA@users.noreply.github.com>
Copilot AI changed the title [WIP] Configure instructions for Copilot in repository Add GitHub Copilot repository instructions Nov 19, 2025
Copilot AI requested a review from ELMOURABEA November 19, 2025 09:47
@ELMOURABEA ELMOURABEA marked this pull request as ready for review November 19, 2025 18:23
Copilot AI review requested due to automatic review settings November 19, 2025 18:23
@ELMOURABEA ELMOURABEA merged commit 7fa389e into main Nov 19, 2025
8 of 12 checks passed

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.

Pull Request Overview

This PR adds comprehensive GitHub Copilot repository instructions to guide AI-assisted code generation and reviews. The instructions document the existing project architecture, coding standards, security practices, and development workflows for the PharmaIntel API.

  • Establishes coding standards (CommonJS, async/await, Prettier/ESLint configs)
  • Documents security best practices (API key management, input validation, rate limiting)
  • Provides clear patterns for routes, services, testing, and error handling

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.

✨ Copilot instructions

3 participants