Skip to content

Commit 32f9464

Browse files
authored
adding co-pilot insstructions (#183)
* adding co-pilot insstructions Signed-off-by: Tim Ireland <[email protected]> * adjustin sonar props Signed-off-by: Tim Ireland <[email protected]> * adjustin sonar props Signed-off-by: Tim Ireland <[email protected]> * adjusting sonar props Signed-off-by: Tim Ireland <[email protected]> * adjusting sonar props Signed-off-by: Tim Ireland <[email protected]> --------- Signed-off-by: Tim Ireland <[email protected]>
1 parent f03815c commit 32f9464

File tree

3 files changed

+66
-4
lines changed

3 files changed

+66
-4
lines changed

.github/copilot-instructions.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Copilot Instructions for NHS Notify Supplier API
2+
3+
## Project Overview
4+
5+
- This repository provides the NHS Notify Supplier API for print suppliers to integrate with NHS Notify message queueing.
6+
- Major components: OpenAPI specification (`specification/api/notify-supplier.yml`), SDKs (`sdk/`), server implementations (`server/`, `src/server/host`), and Lambda handlers (`lambdas/`).
7+
- Data flows: API requests are modeled via OAS, processed by server/Lambda code, and may interact with AWS services (e.g., S3, database).
8+
9+
## Developer Workflows
10+
11+
- **Build SDKs and Docs:**
12+
- Run `make clean && make build` to generate Python/TypeScript SDKs and HTML docs from the OAS spec.
13+
- Serve docs locally with `make serve` [default](http://localhost:3050).
14+
- **CI/CD:**
15+
- PRs trigger CI via GitHub Actions (`.github/workflows/cicd-1-pull-request.yaml`).
16+
- Merging to `main` creates a pre-release; deployments use `.github/workflows/cicd-3-deploy.yaml`.
17+
- **Dev Environment:**
18+
- Use the provided devcontainer for setup and configuration. Avoid manual SDK changes; always rebuild.
19+
20+
## Project-Specific Conventions
21+
22+
- **SDKs:**
23+
- Never manually edit files in `sdk/`; always regenerate from the OAS spec.
24+
- SDK folder is excluded from git and built/released via CI.
25+
- **Servers:**
26+
- Server code is generated at build time from OAS specs. See `server/` and `src/server/host` for custom logic.
27+
- **Test Data:**
28+
- Use `scripts/test-data` to generate and upload test letters to S3. Example command:
29+
30+
```bash
31+
npm run cli -- create-letter --supplier-id ... --environment ... --awsAccountId ... --letter-id ... --group-id ... --specification-id ... --status PENDING
32+
```
33+
34+
## Integration Points
35+
36+
- **External Services:**
37+
- AWS S3 and database for test data and letter storage.
38+
- OpenAPI Generator CLI for SDK/server generation.
39+
- **Documentation:**
40+
- Latest [docs](https://nhsdigital.github.io/nhs-notify-supplier-api/)
41+
- Local docs: `make serve`
42+
43+
## Key Files & Directories
44+
45+
- `specification/api/notify-supplier.yml`: Main API spec
46+
- `sdk/`: Generated SDKs (Python, TypeScript, CSharp)
47+
- `server/`, `src/server/host`: Server implementations
48+
- `lambdas/`: Lambda handlers
49+
- `scripts/test-data/`: Test data generation scripts
50+
- `docs/`: Documentation source
51+
52+
## Patterns & Examples
53+
54+
- Always regenerate SDKs/servers after spec changes.
55+
- Use Makefile targets for all build/test workflows.
56+
- Reference the README for up-to-date workflow and integration details.
57+
58+
---
59+
For unclear or missing conventions, consult `/README.md` or ask maintainers for guidance.

scripts/config/sonar-scanner.properties

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
sonar.host.url=https://sonarcloud.io
44
sonar.qualitygate.wait=true
55
sonar.sourceEncoding=UTF-8
6-
sonar.sources=lambdas/example-lambda
7-
sonar.tests=tests/, lambdas/example-lambda/src/__tests__
8-
sonar.exclusions=lambdas/*/src/__tests__/**/*
6+
sonar.sources=lambdas/api-handler/src, lambdas/authorizer/src
7+
sonar.tests=tests/, lambdas/authorizer/src/__tests__
8+
sonar.exclusions=lambdas/**/src/__tests__/**/*
9+
sonar.test.inclusions=**/*.test.*, **/*.spec.*
910
sonar.terraform.provider.aws.version=5.54.1
1011
sonar.cpd.exclusions=**.test.*
11-
sonar.coverage.exclusions=tests/, **/*.dev.*, lambdas/**/src/__tests__, utils/utils/src/zod-validators.ts ,**/jest.config.ts,scripts/**/*
12+
sonar.coverage.exclusions=tests/, **/*.dev.*, lambdas/**/src/__tests__,
1213

1314
#sonar.python.coverage.reportPaths=.coverage/coverage.xml
1415
sonar.javascript.lcov.reportPaths=lcov.info

scripts/config/vale/styles/config/vocabularies/words/accept.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ bot
44
Cognito
55
Cyber
66
Dependabot
7+
Dev
78
devcontainer
89
draw.io
910
drawio
@@ -16,6 +17,7 @@ Gitleaks
1617
Grype
1718
idempotence
1819
Jira
20+
Makefile
1921
OAuth
2022
Octokit
2123
onboarding

0 commit comments

Comments
 (0)