Skip to content

Commit 1effe4c

Browse files
author
apm-ops
committed
Initial commit
0 parents  commit 1effe4c

File tree

84 files changed

+8037
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+8037
-0
lines changed

.dependabot/config.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: 1
2+
update_configs:
3+
- package_manager: "javascript"
4+
directory: "/"
5+
update_schedule: "live"
6+
automerged_updates:
7+
- match:
8+
dependency_type: "all"
9+
update_type: "security:patch"
10+
- package_manager: "javascript"
11+
directory: "/sandbox"
12+
update_schedule: "live"
13+
automerged_updates:
14+
- match:
15+
dependency_type: "all"
16+
update_type: "security:patch"
17+
- package_manager: "python"
18+
directory: "/"
19+
update_schedule: "live"
20+
automerged_updates:
21+
- match:
22+
dependency_type: "all"
23+
update_type: "security:patch"

.editorconfig

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
end_of_line = lf
10+
11+
[Makefile]
12+
indent_style = tab
13+
14+
[*.{xml,js,json,yaml}]
15+
indent_size = 2
16+
17+
[*.postman_collection.json]
18+
indent_style = tab
19+
20+
[*.yaml]
21+
trim_trailing_whitespace = false
22+
23+
[*.js]
24+
ij_javascript_force_semicolon_style = true
25+
ij_javascript_use_semicolon_after_statement = false

.flake8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
max-line-length=120
3+
exclude = .git,__pycache__,dist,.venv/*,node_modules/*,utils/*,tests/.venv/*
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser: [e.g. chrome, safari]
29+
- Version: [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser: [e.g. stock browser, safari]
35+
- Version: [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/pull_request_template.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Summary
2+
* Routine Change
3+
* :exclamation: Breaking Change
4+
* :robot: Operational or Infrastructure Change
5+
* :sparkles: New Feature
6+
* :warning: Potential issues that might be caused by this change
7+
8+
Add any other relevant notes or explanations here. **Remove this line if you have nothing to add.**
9+
10+
11+
## Reviews Required
12+
* [x] Dev
13+
* [ ] Test
14+
* [ ] Tech Author
15+
* [ ] Product Owner
16+
17+
18+
## Review Checklist
19+
:information_source: This section is to be filled in by the **reviewer**.
20+
21+
* [ ] I have reviewed the changes in this PR and they fill all or part of the acceptance criteria of the ticket, and the code is in a mergeable state.
22+
* [ ] If there were infrastructure, operational, or build changes, I have made sure there is sufficient evidence that the changes will work.
23+
* [ ] I have ensured the changelog has been updated by the submitter, if necessary.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Create Release
2+
on: push
3+
4+
jobs:
5+
create_release:
6+
name: build
7+
runs-on: ubuntu-latest
8+
if: github.ref == 'refs/heads/master'
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0 # This causes all history to be fetched, which is required for calculate-version to function
14+
15+
- name: Install Python 3.8
16+
uses: actions/setup-python@v1
17+
with:
18+
python-version: 3.8
19+
20+
- name: Upgrade python pip
21+
run: python -m pip install --upgrade pip
22+
23+
- name: Install git
24+
run: pip install gitpython
25+
26+
- name: Install semver
27+
run: pip install semver
28+
29+
- name: Set SPEC_VERSION env var
30+
run: echo ::set-env name=SPEC_VERSION::$(python scripts/calculate_version.py)
31+
env:
32+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
33+
34+
- name: Create release (master only)
35+
id: create-release
36+
if: github.ref == 'refs/heads/master'
37+
uses: actions/create-release@v1
38+
continue-on-error: true
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
with:
42+
tag_name: ${{ env.SPEC_VERSION }}
43+
release_name: ${{ env.SPEC_VERSION }}
44+

.github/workflows/pr-lint.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: PR Quality Check
2+
on: pull_request
3+
jobs:
4+
link-ticket:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Check ticket name conforms to requirements
8+
run: echo ${{ github.event.pull_request.head.ref }} | grep -i -E -q "(apm-[0-9]+)|(apmspii-[0-9]+)|(adz-[0-9]+)|(amb-[0-9]+)|(dependabot\/)"
9+
continue-on-error: true
10+
11+
- name: Grab ticket name
12+
if: contains(github.event.pull_request.head.ref, 'apm-') || contains(github.event.pull_request.head.ref, 'APM-') || contains(github.event.pull_request.head.ref, 'apmspii-') || contains(github.event.pull_request.head.ref, 'APMSPII-') || contains(github.event.pull_request.head.ref, 'adz-') || contains(github.event.pull_request.head.ref, 'ADZ-') || contains(github.event.pull_request.head.ref, 'amb-') || contains(github.event.pull_request.head.ref, 'AMB-')
13+
run: echo ::set-env name=TICKET_NAME::$(echo ${{ github.event.pull_request.head.ref }} | grep -i -o '\(apm-[0-9]\+\)\|\(apmspii-[0-9]\+\)\|\(adz-[0-9]\+\)|\(amb-[0-9]\+\)' | tr '[:lower:]' '[:upper:]')
14+
continue-on-error: true
15+
env:
16+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
17+
18+
- name: Comment on PR with link to JIRA ticket
19+
if: contains(github.event.pull_request.head.ref, 'apm-') || contains(github.event.pull_request.head.ref, 'APM-') || contains(github.event.pull_request.head.ref, 'apmspii-') || contains(github.event.pull_request.head.ref, 'APMSPII-') || contains(github.event.pull_request.head.ref, 'adz-') || contains(github.event.pull_request.head.ref, 'ADZ-') || contains(github.event.pull_request.head.ref, 'amb-') || contains(github.event.pull_request.head.ref, 'AMB-')
20+
continue-on-error: true
21+
uses: unsplash/comment-on-pr@master
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
with:
25+
msg: |
26+
This branch is work on a ticket in the NHS Digital APM JIRA Project. Here's a handy link to the ticket:
27+
# [${{ env.TICKET_NAME }}](https://nhsd-jira.digital.nhs.uk/browse/${{ env.TICKET_NAME}})
28+

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
.direnv
3+
node_modules/
4+
bin/
5+
dist/
6+
build/
7+
public/
8+
newman/
9+
.idea
10+
.DS_Store
11+
.#*
12+
13+
__pycache__/
14+
.envrc
15+
.idea/
16+
.venv/
17+
18+
smoketest-report.xml
19+
env
20+
.dir-locals.el
21+
*.pyc

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

0 commit comments

Comments
 (0)