Skip to content

Commit 735934a

Browse files
committed
CCM-5104: Import changes from template repo
1 parent 847ebae commit 735934a

31 files changed

+726
-115
lines changed

.github/README.md

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Combine Dependabot PRs
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
checks: read
10+
11+
jobs:
12+
combine-prs:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: combine-prs
17+
id: combine-prs
18+
uses: github/combine-prs@v5.1.0
19+
with:
20+
ci_required: false
21+
labels: dependencies
22+
pr_title: Combined Dependabot PRs
23+
combine_branch_name: dependabotCombined
24+
pr_body_header: Combined Dependabot PRs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Repository Template Sync
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 1 * *'
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
checks: read
12+
13+
jobs:
14+
update-external-repo:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Check out the repository
19+
uses: actions/checkout@v4
20+
21+
- name: Check out external repository
22+
uses: actions/checkout@v4
23+
with:
24+
repository: NHSDigital/nhs-notify-repository-template
25+
path: nhs-notify-repository-template
26+
token: ${{ github.token }}
27+
28+
- name: Run syncronisation script
29+
run: |
30+
./scripts/githooks/sync-template-repo.sh
31+
rm -Rf ./nhs-notify-repository-template
32+
33+
- name: Create Pull Request
34+
if: ${{ !env.ACT }}
35+
uses: peter-evans/create-pull-request@v7.0.1
36+
with:
37+
token: ${{ secrets.GITHUB_TOKEN }}
38+
commit-message: Drift from template
39+
branch: scheduledTemplateRepositorySync
40+
delete-branch: true
41+
title: '[Template Sync] Drift from template-repository remediation'
42+
body: |
43+
# Resultant drift from repository template
44+
45+
## Who should respond to this PR?
46+
The team which owns the responsibility for this component repository. You may want to consult other contributors.
47+
48+
## How to progress this PR
49+
The repositories guardians should review the contents of the PR and decide how to proceed, you may wish to back-out certain changes or accept them from the upstream `nhsdigital/nhs-notify-repository-template` repository.
50+
51+
If there are changes you do not wish to see again, it is recommended you add exclusions to `scripts/config/.repository-template-sync-ignore`.
52+
labels: |
53+
template
54+
automation
55+
draft: false

.github/workflows/scorecard.yml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# This workflow uses actions that are not certified by GitHub. They are provided
2+
# by a third-party and are governed by separate terms of service, privacy
3+
# policy, and support documentation.
4+
5+
name: Scorecard supply-chain security
6+
on:
7+
# For Branch-Protection check. Only the default branch is supported. See
8+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
9+
branch_protection_rule:
10+
# To guarantee Maintained check is occasionally updated. See
11+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
12+
schedule:
13+
- cron: '15 22 * * 5'
14+
push:
15+
branches: [ "main" ]
16+
17+
# Declare default permissions as read only.
18+
permissions: read-all
19+
20+
jobs:
21+
analysis:
22+
name: Scorecard analysis
23+
runs-on: ubuntu-latest
24+
permissions:
25+
# Needed to upload the results to code-scanning dashboard.
26+
security-events: write
27+
# Needed to publish results and get a badge (see publish_results below).
28+
id-token: write
29+
# Uncomment the permissions below if installing in a private repository.
30+
# contents: read
31+
# actions: read
32+
33+
steps:
34+
- name: "Checkout code"
35+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
36+
with:
37+
persist-credentials: false
38+
39+
- name: "Run analysis"
40+
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
41+
with:
42+
results_file: results.sarif
43+
results_format: sarif
44+
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
45+
# - you want to enable the Branch-Protection check on a *public* repository, or
46+
# - you are installing Scorecard on a *private* repository
47+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
48+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
49+
50+
# Public repositories:
51+
# - Publish results to OpenSSF REST API for easy access by consumers
52+
# - Allows the repository to include the Scorecard badge.
53+
# - See https://github.com/ossf/scorecard-action#publishing-results.
54+
# For private repositories:
55+
# - `publish_results` will always be set to `false`, regardless
56+
# of the value entered here.
57+
publish_results: false
58+
59+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
60+
# format to the repository Actions tab.
61+
- name: "Upload artifact"
62+
uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
63+
with:
64+
name: SARIF file
65+
path: results.sarif
66+
retention-days: 5
67+
68+
# Upload the results to GitHub's code scanning dashboard (optional).
69+
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
70+
- name: "Upload to code-scanning"
71+
uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
72+
with:
73+
sarif_file: results.sarif

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*vulnerabilities*report*.json
77
*report*json.zip
88
.version
9-
9+
version.json
1010
*.code-workspace
1111
!project.code-workspace
1212

.tool-versions

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# This file is for you! Please, updated to the versions agreed by your team.
2-
3-
terraform 1.7.0
1+
act 0.2.64
2+
gitleaks 8.18.4
43
pre-commit 3.6.0
5-
nodejs 18.18.2
6-
gitleaks 8.15.3
4+
terraform 1.9.2
5+
tfsec 1.28.10
6+
vale 3.6.0
77

88
# ==============================================================================
99
# The section below is reserved for Docker image versions.
@@ -17,7 +17,7 @@ gitleaks 8.15.3
1717
# docker/ghcr.io/nhs-england-tools/github-runner-image 20230909-321fd1e-rt@sha256:ce4fd6035dc450a50d3cbafb4986d60e77cb49a71ab60a053bb1b9518139a646 # SEE: https://github.com/nhs-england-tools/github-runner-image/pkgs/container/github-runner-image
1818
# docker/hadolint/hadolint 2.12.0-alpine@sha256:7dba9a9f1a0350f6d021fb2f6f88900998a4fb0aaf8e4330aa8c38544f04db42 # SEE: https://hub.docker.com/r/hadolint/hadolint/tags
1919
# docker/hashicorp/terraform 1.5.6@sha256:180a7efa983386a27b43657ed610e9deed9e6c3848d54f9ea9b6cb8a5c8c25f5 # SEE: https://hub.docker.com/r/hashicorp/terraform/tags
20-
# docker/jdkato/vale v2.29.7@sha256:5ccfac574231b006284513ac3e4e9f38833989d83f2a68db149932c09de85149 # SEE: https://hub.docker.com/r/jdkato/vale/tags
20+
# docker/jdkato/vale v3.6.0@sha256:0ef22c8d537f079633cfff69fc46f69a2196072f69cab1ab232e8a79a388e425 # SEE: https://hub.docker.com/r/jdkato/vale/tags
2121
# docker/koalaman/shellcheck latest@sha256:e40388688bae0fcffdddb7e4dea49b900c18933b452add0930654b2dea3e7d5c # SEE: https://hub.docker.com/r/koalaman/shellcheck/tags
2222
# docker/mstruebing/editorconfig-checker 2.7.1@sha256:dd3ca9ea50ef4518efe9be018d669ef9cf937f6bb5cfe2ef84ff2a620b5ddc24 # SEE: https://hub.docker.com/r/mstruebing/editorconfig-checker/tags
2323
# docker/sonarsource/sonar-scanner-cli 5.0.1@sha256:494ecc3b5b1ee1625bd377b3905c4284e4f0cc155cff397805a244dee1c7d575 # SEE: https://hub.docker.com/r/sonarsource/sonar-scanner-cli/tags

Makefile

+8-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies: # Install dependencies needed to build and test the project @Pipel
1111
# TODO: Implement installation of your project dependencies
1212

1313
build: # Build the project artefact @Pipeline
14-
# TODO: Implement the artefact build step
14+
(cd docs && make build)
1515

1616
publish: # Publish the project artefact @Pipeline
1717
# TODO: Implement the artefact publishing step
@@ -20,12 +20,16 @@ deploy: # Deploy the project artefact to the target environment @Pipeline
2020
# TODO: Implement the artefact deployment step
2121

2222
clean:: # Clean-up project resources (main) @Operations
23+
rm -f .version
2324
# TODO: Implement project resources clean-up step
2425

25-
config:: # Configure development environment (main) @Configuration
26-
# TODO: Use only 'make' targets that are specific to this project, e.g. you may not need to install Node.js
27-
make _install-dependencies
26+
config:: _install-dependencies version # Configure development environment (main) @Configuration
27+
(cd docs && make install)
2828

29+
version:
30+
rm -f .version
31+
make version-create-effective-file dir=.
32+
echo "{ \"schemaVersion\": 1, \"label\": \"version\", \"message\": \"$$(head -n 1 .version 2> /dev/null || echo unknown)\", \"color\": \"orange\" }" > version.json
2933
# ==============================================================================
3034

3135
${VERBOSE}.SILENT: \

docs/.vscode/tasks.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"version": "2.0.0",
32
"tasks": [
43
{
4+
"command": "kill $(lsof -ti :4000); exit 0;",
55
"label": "stop-already-running",
66
"options": {
77
"cwd": "${workspaceFolder}"
88
},
9-
"command": "kill $(lsof -ti :4000); exit 0;",
109
"type": "shell"
1110
}
12-
]
11+
],
12+
"version": "2.0.0"
1313
}

docs/_sass/color_schemes/nhs.scss

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
@import "./color_schemes/light";
22

3-
43
@font-face {
54
font-family: "Frutiger W01";
65
font-style: normal;
7-
src: url("https://assets.nhs.uk/fonts/FrutigerLTW01-55Roman.woff2") format('woff2');
6+
src: url("https://assets.nhs.uk/fonts/FrutigerLTW01-55Roman.woff2")
7+
format("woff2");
88
}
99

1010
@font-face {
1111
font-family: "Frutiger W01";
1212
font-weight: 800;
1313
font-style: normal;
14-
src: url("https://assets.nhs.uk/fonts/FrutigerLTW01-65Bold.woff2") format('woff2');
14+
src: url("https://assets.nhs.uk/fonts/FrutigerLTW01-65Bold.woff2")
15+
format("woff2");
1516
}
1617

17-
1818
// Typography
1919

2020
// prettier-ignore
@@ -24,7 +24,7 @@ $body-font-family: Frutiger W01,Arial,Sans-serif;
2424
$blue-000: #005eb8;
2525
$grey-dk-000: #d8dde0;
2626
$grey-dk-100: #f0f4f5;
27-
$grey-dk-300: #212B32;
27+
$grey-dk-300: #212b32;
2828
$sidebar-color: $grey-dk-100;
2929
$body-background-color: $grey-dk-100;
3030
$link-color: $blue-000;
@@ -33,3 +33,6 @@ $font-size-7: 1.25rem;
3333
$font-size-6: 2rem;
3434
$font-size-8: 3rem;
3535
//$font-size-5: 1.188rem; // h3
36+
37+
$nav-width: 20rem;
38+
$content-width: 130rem;

docs/_sass/custom/custom.scss

+24-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Totally custom here.
22

33
.nav-category {
4-
text-transform:none;
4+
text-transform: none;
55
color: $grey-dk-300;
66
@include fs-4;
77
font-weight: 600;
@@ -14,7 +14,7 @@
1414
}
1515
}
1616
}
17-
.site-title{
17+
.site-title {
1818
font-weight: 600;
1919
font-size: 1.2rem !important;
2020
}
@@ -23,7 +23,7 @@
2323
.nav-list-item {
2424
@include fs-4;
2525
font-weight: 400;
26-
-webkit-font-smoothing:antialiased;
26+
-webkit-font-smoothing: antialiased;
2727
}
2828
}
2929

@@ -35,22 +35,34 @@ body {
3535
}
3636

3737
@media (min-width: 31.25rem) {
38-
h1, .text-alpha {
39-
font-size: 3rem !important;
40-
font-weight: 600;
38+
h1,
39+
.text-alpha {
40+
font-size: 3rem !important;
41+
font-weight: 600;
4142
}
4243
}
4344

4445
@media (min-width: 31.25rem) {
45-
h2, .text-alpha {
46-
font-size: 2rem !important;
47-
font-weight: 600;
46+
h2,
47+
.text-alpha {
48+
font-size: 2rem !important;
49+
font-weight: 600;
4850
}
4951
}
5052

5153
@media (min-width: 31.25rem) {
52-
h3, .text-alpha {
53-
font-size: 1.5rem !important;
54-
font-weight: 600;
54+
h3,
55+
.text-alpha {
56+
font-size: 1.5rem !important;
57+
font-weight: 600;
5558
}
5659
}
60+
61+
.table-wrapper {
62+
display: inline-block;
63+
width: unset;
64+
}
65+
66+
th, td {
67+
min-width: 1%;
68+
}
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"main": "main.ts",
3-
"scripts": {
4-
"start": "ts-node main.ts"
5-
},
62
"dependencies": {
73
"@octokit/auth-app": "^6.0.0",
84
"octokit": "^3.1.0"
95
},
106
"devDependencies": {
117
"ts-node": "^10.9.1",
128
"typescript": "^5.2.2"
9+
},
10+
"main": "main.ts",
11+
"scripts": {
12+
"start": "ts-node main.ts"
1313
}
1414
}
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
{
22
"compilerOptions": {
3-
"target": "ES6",
3+
"esModuleInterop": true,
44
"module": "commonjs",
55
"strict": true,
6-
"esModuleInterop": true
6+
"target": "ES6"
77
},
8-
"include": ["*.ts"],
9-
"exclude": ["node_modules"]
8+
"exclude": [
9+
"node_modules"
10+
],
11+
"include": [
12+
"*.ts"
13+
]
1014
}

docs/collections/_guides/developer-guides/github.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This guide follows the NHSE Software Engineering Quality Framework, in particula
1818

1919
Following
2020
the [SEQF guidance](https://github.com/NHSDigital/software-engineering-quality-framework/blob/main/practices/securing-repositories.md#teams-setup),
21-
the default codeowner should be the GitHub team with write access to the repository.
21+
the default code owner should be the GitHub team with write access to the repository.
2222

2323
In addition, due to the multi-repository structure of the codebase, the CODEOWNERS files themselves are protected by
2424
requiring approval from a project-wide nhs-notify-code-owners team.

0 commit comments

Comments
 (0)