Skip to content

Commit

Permalink
chore: add issue / pr templates (#71)
Browse files Browse the repository at this point in the history
* chore: add issue / pr templates

* add commitlint for PR title checks
  • Loading branch information
TristanHoladay committed Jul 19, 2024
1 parent b9ad6bc commit adc09e2
Show file tree
Hide file tree
Showing 6 changed files with 125 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: possible-bug
assignees: ''
---

### Environment

Device and OS:
App version:
Kubernetes distro being used:
Other:

### Steps to reproduce

1.

### Expected result

### Actual Result

### Visual Proof (screenshots, videos, text, etc)

### Severity/Priority

### Additional Context

Add any other context or screenshots about the technical debt here.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'enhancement'
assignees: ''
---

### Is your feature request related to a problem? Please describe

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

### Describe the solution you'd like

- **Given** a state
- **When** an action is taken
- **Then** something happens

### Describe alternatives you've considered

(optional) A clear and concise description of any alternative solutions or features you've considered.

### Additional context

Add any other context or screenshots about the feature request here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/tech_debt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Tech debt
about: Record something that should be investigated or refactored in the future.
title: ''
labels: 'tech-debt'
assignees: ''
---

### Describe what should be investigated or refactored

A clear and concise description of what should be changed/researched. Ex. This piece of the code is not DRY enough [...]

### Links to any relevant code

(optional) i.e. - <https://github.com/defenseunicorns/uds-template-capability/blob/main/README.md?plain=1#L1>

### Additional context

Add any other context or screenshots about the technical debt here.
17 changes: 17 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Description

...

## Related Issue

Relates to #

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [ ] Test, docs, adr added or updated as needed
33 changes: 33 additions & 0 deletions .github/workflows/commitlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: PR Title Check

on:
pull_request:
branches: [main]
types: [opened, edited, synchronize]

permissions:
contents: read

jobs:
title_check:
runs-on: ubuntu-latest
permissions:
pull-requests: read

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3

- name: Install commitlint
run: npm install --save-dev @commitlint/{config-conventional,cli}

- name: Lint PR title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
echo "$PR_TITLE" | npx commitlint
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ["@commitlint/config-conventional"] };

0 comments on commit adc09e2

Please sign in to comment.