Skip to content

Commit b32ce63

Browse files
authored
Documentation and templates (#19)
* Add CONTRIBUTING.md * Move CONTRIBUTING into docs * Add pull request template * Add bug report template * clarify checklist * Add guidance on draft contributions * Move BUG_REPORT.md to correct location * address PR comments
1 parent 64996cd commit b32ce63

3 files changed

Lines changed: 155 additions & 0 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<!--
2+
Thank you for reporting a bug to DXT! Please follow the instructions in the comment tags.
3+
Unless you have been instructed, do not delete any text in this template.
4+
-->
5+
6+
# Describe the bug
7+
8+
A clear and concise description of what the bug is.
9+
10+
# Steps to reproduce
11+
12+
<!--
13+
This should be a step-by-step guide on how to replicate your issue. Be as detailed as you can.
14+
Please upload your form definition JSON to this issue, if appropriate.
15+
-->
16+
17+
Steps to reproduce the behavior, e.g.:
18+
19+
1. Create a form containing '...'
20+
2. Navigate to the '....' page
21+
3. Click on '....' or type in '....'
22+
4. See error
23+
24+
# Expected behaviour
25+
26+
A clear and concise description of what you expected to happen.
27+
28+
# Environment
29+
30+
## Desktop (please complete the following information)
31+
32+
- OS: [e.g. iOS]
33+
- Browser [e.g. chrome, safari]
34+
- Version [e.g. 22]
35+
36+
## Smartphone (please complete the following information):
37+
38+
- Device: [e.g. iPhone6]
39+
- OS: [e.g. iOS8.1]
40+
- Browser [e.g. stock browser, safari]
41+
- Version [e.g. 22]
42+
43+
# Checklist
44+
45+
<!--
46+
Mark each completed item with an X, e.g. "[X] You have....".
47+
-->
48+
49+
- [] You have verified this is affecting the latest version of `@defra/forms-engine-plugin` or the production version of our service `https://forms-designer.prod.cdp-int.defra.cloud/`
50+
- [] You have filled out the required sections above
51+
- [] You have uploaded a copy of your JSON form definition to this issue

docs/CONTRIBUTING.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Contributing to DXT
2+
3+
> [!NOTE]
4+
> This guide is for developers within the Department for Environment, Food & Rural Affairs. We do not guarantee support for those outside of this organisation.
5+
6+
Thank you for considering making a contribution to DXT! Our goal is to make DXT a community-driven effort, collaboratively supporting the needs of the many teams within the Defra Group.
7+
8+
This guide aims to set clear expectations for everyone involved in our project, to make collaborating a smooth and enjoyable experience.
9+
10+
# I have a question
11+
12+
If you are within Department for Environment, Food & Rural Affairs, please primarily direct your questions to our Slack channel [#defra-forms-support](https://defra-digital-team.slack.com). Our team monitors this channel during working hours and will provide assistance.
13+
14+
# I want to request something
15+
16+
## Reporting bugs
17+
18+
Report bugs on the [#defra-forms-support](https://defra-digital-team.slack.com) slack channel. If you are not a member of Defra, [submit a GitHub issue](https://github.com/DEFRA/forms-engine-plugin/issues).
19+
20+
Ensure you are experiencing it with the latest version of `@defra/forms-engine-plugin` or the production version of our service `https://forms-designer.prod.cdp-int.defra.cloud/`. Support for older versions is not currently provided.
21+
22+
If your bug is with the plugin, ensure you are running the plugin in a supported environment: see `package.json` to validate the compatible Node runtime and `README.md` to validate runtime dependencies.
23+
24+
**What we need from you:**
25+
26+
- A short and clear description of the issue. Explain the current behaviour along with the expected behaviour.
27+
- A step-by-step guide that details how we can reproduce your issue
28+
- A text copy (not a screenshot) of any error messages and stack traces
29+
- The version of your runtime (e.g. Node 22.11.0)
30+
- If the issue is with a form, a copy of the form definition (JSON) file
31+
32+
**What we will provide:**
33+
34+
- An acknowledgement of your issue
35+
- A Azure DevOps ticket number, where any remediation work will be tracked
36+
- An estimated timeframe for a resolution
37+
- An update once the issue is resolved
38+
39+
## Suggesting features
40+
41+
Feature suggestions are welcomed from teams within Defra Group only. Our roadmap is continually updated as new requirements emerge. Suggest new features on our [#defra-forms-support](https://defra-digital-team.slack.com) slack channel.
42+
43+
# I want to contribute something
44+
45+
All code contributed to this repository should meet the [Defra software development standards](https://defra.github.io/software-development-standards/). Our codebase, by exception, allows modification of Typescript files where appropriate. However, new code that is contributed should be Javascript with types via JSDoc, not Typescript.
46+
47+
Our specific coding standards are primarily enforced by our GitHub workflows. These workflows will verify using tsc, ESLint, Prettier, EditorConfig and Stylelint. See the `lint` job within [.github/workflows/check-pull-request.yml](.github/workflows/check-pull-request.yml) for more details.
48+
49+
Our GitHub Workflows will mark each pull request with a pass/fail based on tests, linting, type checking and analysis by SonarQube. **Pull requests that fail these checks will not be accepted.**
50+
51+
Draft pull requests are accepted if you are not yet finished, but would like early feedback. Pull requests that remain as a draft for over 30 days will be closed.
52+
53+
## Fixing bugs
54+
55+
If you would like to fix the bug yourself, contributions are accepted through pull requests.
56+
57+
## Adding features
58+
59+
Features should be discussed with the Defra Forms team prior to implementation. This is to prevent wasted effort if the Defra Forms team decides not to accept it, or if we suggest any significant amendments. Reach out to us on [#defra-forms-support](https://defra-digital-team.slack.com) to discuss your requirements. If accepted by the product owner, we welcome a pull request.

docs/PULL_REQUEST_TEMPLATE.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<!--
2+
Thank you for contributing to DXT! Please follow the instructions in the comment tags.
3+
Unless you have been instructed, do not delete any text in this template.
4+
-->
5+
6+
## Proposed change
7+
8+
<!--
9+
Give a high-level description of the content of this pull request. No more than a couple of sentences.
10+
11+
If you have consulted with the Defra Forms team prior to implementation, they will have provided you with an Azure DevOps work item number or (preferably) a link. Please include this.
12+
-->
13+
14+
Azure DevOps work item:
15+
16+
## Type of change
17+
18+
<!--
19+
What type of change is this pull request? Mark the option with an X inside the brackets.
20+
If your change covers multiple categories, please split the pull request up to make it easier to review.
21+
-->
22+
23+
- [] Bug fix
24+
- [] New feature
25+
- [] Breaking change
26+
- [] Misc. (documentation, build updates, etc)
27+
28+
## Checklist
29+
30+
<!--
31+
Mark each completed item with an X, e.g. "[X] You have....".
32+
Feel free to chat to us on Slack if you have any questions.
33+
34+
If you have not completed all of this, you are welcome to submit your pull request in a draft state
35+
to give us visibility and gather early feedback until it is ready for review.
36+
-->
37+
38+
- [] You have executed this code locally and it performs as expected.
39+
- [] You have added tests to verify your code works.
40+
- [] You have added code comments and JSDoc, where appropriate.
41+
- [] There is no commented-out code.
42+
- [] You have added developer docs in `README.md` and `docs/*` (where appropriate, e.g. new features).
43+
- [] The tests are passing (`npm run test`).
44+
- [] The linting checks are passing (`npm run lint`).
45+
- [] The code has been formatted (`npm run format`).

0 commit comments

Comments
 (0)