Skip to content

Commit d7ac12d

Browse files
committed
chore: implement GitHub best practices (Phase 4 & 5)
- Add Dependabot configuration for automated dependency updates - Add issue templates (bug report, feature request) - Add pull request template - Add CI/CD workflows - Add security workflows (CodeQL, dependency review) - Add stale issue management - Add Dependabot auto-merge workflow - Add CODEOWNERS file - Add SECURITY.md - Add CONTRIBUTING.md - Add CODE_OF_CONDUCT.md Part of Sensible Analytics GitHub improvement initiative.
1 parent 18eec8d commit d7ac12d

14 files changed

Lines changed: 995 additions & 9 deletions

.github/CODEOWNERS

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Default CODEOWNERS for Sensible Analytics repositories
2+
3+
# Global fallback - all files
4+
* @Sensible-Analytics/engineering
5+
6+
# Organization-level files
7+
.github/ @Sensible-Analytics/engineering
8+
CODEOWNERS @Sensible-Analytics/engineering
9+
LICENSE @Sensible-Analytics/engineering
10+
SECURITY.md @Sensible-Analytics/engineering
11+
12+
# Documentation
13+
README.md @Sensible-Analytics/engineering
14+
CONTRIBUTING.md @Sensible-Analytics/engineering
15+
CODE_OF_CONDUCT.md @Sensible-Analytics/engineering
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: 🐛 Bug Report
2+
description: Report a bug or unexpected behavior
3+
labels: ["bug", "triage"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to report a bug! Please search existing issues first to avoid duplicates.
9+
10+
⚠️ **Security Issues**: Do NOT use this template for security vulnerabilities.
11+
Please email [security@sensibleanalytics.co](mailto:security@sensibleanalytics.co) instead.
12+
13+
- type: checkboxes
14+
id: pre-flight
15+
attributes:
16+
label: Pre-flight Checks
17+
description: Please confirm you've completed these steps
18+
options:
19+
- label: I have searched for existing issues (open and closed)
20+
required: true
21+
- label: I am using the latest version of the software
22+
required: true
23+
- label: I have read the relevant documentation
24+
required: false
25+
26+
- type: textarea
27+
id: description
28+
attributes:
29+
label: Bug Description
30+
description: A clear and concise description of what the bug is
31+
placeholder: |
32+
When I try to [action], [unexpected behavior] happens instead of [expected behavior].
33+
validations:
34+
required: true
35+
36+
- type: textarea
37+
id: reproduction
38+
attributes:
39+
label: Steps to Reproduce
40+
description: Steps to reproduce the behavior
41+
placeholder: |
42+
1. Go to '...'
43+
2. Click on '...'
44+
3. Scroll down to '...'
45+
4. See error
46+
validations:
47+
required: true
48+
49+
- type: textarea
50+
id: expected
51+
attributes:
52+
label: Expected Behavior
53+
description: What you expected to happen
54+
placeholder: I expected the application to...
55+
validations:
56+
required: true
57+
58+
- type: textarea
59+
id: actual
60+
attributes:
61+
label: Actual Behavior
62+
description: What actually happened
63+
placeholder: Instead, the application...
64+
validations:
65+
required: true
66+
67+
- type: textarea
68+
id: environment
69+
attributes:
70+
label: Environment
71+
description: |
72+
Please provide details about your environment:
73+
- OS: [e.g., macOS, Windows, Linux]
74+
- Browser: [e.g., Chrome, Safari, Firefox] (if applicable)
75+
- Node.js version: [e.g., 18.17.0] (run `node --version`)
76+
- Package version: [e.g., 1.2.3]
77+
render: bash
78+
placeholder: |
79+
OS: macOS 14.0
80+
Browser: Chrome 120
81+
Node.js: 18.17.0
82+
Package Version: 1.2.3
83+
validations:
84+
required: true
85+
86+
- type: textarea
87+
id: logs
88+
attributes:
89+
label: Logs & Screenshots
90+
description: |
91+
If applicable, add screenshots, error messages, or log output to help explain your problem.
92+
93+
Tip: For long logs, use `<details><summary>Click to expand</summary>...logs...</details>`
94+
95+
- type: dropdown
96+
id: severity
97+
attributes:
98+
label: Severity
99+
description: How severe is this issue?
100+
options:
101+
- Critical - Application crashes or data loss
102+
- High - Major feature broken, workaround difficult
103+
- Medium - Feature partially broken, workaround exists
104+
- Low - Minor issue, cosmetic, or enhancement
105+
default: 2
106+
107+
- type: checkboxes
108+
id: terms
109+
attributes:
110+
label: Code of Conduct
111+
description: By submitting this issue, you agree to follow our [Code of Conduct](../CODE_OF_CONDUCT.md)
112+
options:
113+
- label: I agree to follow this project's Code of Conduct
114+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: ❓ Ask a Question
4+
url: https://github.com/orgs/Sensible-Analytics/discussions/categories/q-a
5+
about: Ask questions and get help from the community
6+
7+
- name: 💡 Feature Ideas & Discussions
8+
url: https://github.com/orgs/Sensible-Analytics/discussions/categories/ideas
9+
about: Share and discuss feature ideas before creating a formal request
10+
11+
- name: 🛡️ Report a Security Vulnerability
12+
url: https://github.com/Sensible-Analytics/.github/blob/main/SECURITY.md
13+
about: Please report security vulnerabilities privately via email
14+
15+
- name: 📖 Documentation Issue
16+
url: https://github.com/Sensible-Analytics/.github/issues/new?template=bug_report.yml
17+
about: Report documentation errors or suggest improvements
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: ✨ Feature Request
2+
description: Suggest a new feature or improvement
3+
labels: ["enhancement", "triage"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to suggest a feature! Please search existing issues and discussions first.
9+
10+
💡 **Tip**: For questions or help, use [Discussions](https://github.com/orgs/Sensible-Analytics/discussions) instead.
11+
12+
- type: checkboxes
13+
id: pre-flight
14+
attributes:
15+
label: Pre-flight Checks
16+
options:
17+
- label: I have searched for existing feature requests
18+
required: true
19+
- label: This is a feature request (not a bug report or question)
20+
required: true
21+
22+
- type: textarea
23+
id: problem
24+
attributes:
25+
label: Is your feature request related to a problem?
26+
description: A clear and concise description of what the problem is
27+
placeholder: |
28+
I'm always frustrated when [...] happens because [...]
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
id: solution
34+
attributes:
35+
label: Describe the solution you'd like
36+
description: A clear and concise description of what you want to happen
37+
placeholder: |
38+
I would like to see [...] implemented so that [...]
39+
validations:
40+
required: true
41+
42+
- type: textarea
43+
id: alternatives
44+
attributes:
45+
label: Describe alternatives you've considered
46+
description: A clear and concise description of any alternative solutions or features you've considered
47+
placeholder: |
48+
I considered [...] but [...]
49+
50+
- type: textarea
51+
id: context
52+
attributes:
53+
label: Additional Context
54+
description: Add any other context, screenshots, or examples about the feature request here
55+
placeholder: |
56+
Use cases:
57+
- As a [type of user], I want [goal] so that [benefit]
58+
- This would help with [...]
59+
60+
- type: dropdown
61+
id: priority
62+
attributes:
63+
label: Priority
64+
description: How important is this feature to you?
65+
options:
66+
- Critical - Blocking my work
67+
- High - Would significantly improve my workflow
68+
- Medium - Nice to have
69+
- Low - Would be convenient
70+
default: 2
71+
72+
- type: checkboxes
73+
id: terms
74+
attributes:
75+
label: Code of Conduct
76+
description: By submitting this issue, you agree to follow our [Code of Conduct](../CODE_OF_CONDUCT.md)
77+
options:
78+
- label: I agree to follow this project's Code of Conduct
79+
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
## Summary
2+
3+
<!-- Provide a brief summary of the changes made in this PR -->
4+
5+
## Changes
6+
7+
<!-- Describe the specific changes made -->
8+
-
9+
-
10+
-
11+
12+
## Motivation
13+
14+
<!-- Why were these changes necessary? Link to any related issues -->
15+
Fixes # (issue number)
16+
17+
## Type of Change
18+
19+
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
20+
- [ ] ✨ New feature (non-breaking change which adds functionality)
21+
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
22+
- [ ] 📚 Documentation update
23+
- [ ] 🔧 Refactoring (no functional changes)
24+
- [ ] ⚡ Performance improvement
25+
- [ ] 🧪 Tests (adding missing tests or correcting existing tests)
26+
- [ ] 🔨 Build/CI related changes
27+
28+
## Testing
29+
30+
<!-- Describe the tests you ran and how to reproduce them -->
31+
- [ ] Unit tests pass (`npm test` or `pytest`)
32+
- [ ] Integration tests pass
33+
- [ ] Manual testing performed
34+
- [ ] Tested on [list platforms/environments]
35+
36+
**Test Instructions:**
37+
```bash
38+
# Provide commands to test these changes
39+
```
40+
41+
## Checklist
42+
43+
- [ ] My code follows the project's style guidelines
44+
- [ ] I have performed a self-review of my code
45+
- [ ] I have commented my code, particularly in hard-to-understand areas
46+
- [ ] I have made corresponding changes to the documentation
47+
- [ ] My changes generate no new warnings
48+
- [ ] I have added tests that prove my fix is effective or that my feature works
49+
- [ ] New and existing unit tests pass locally with my changes
50+
- [ ] Any dependent changes have been merged and published
51+
52+
## Screenshots (if applicable)
53+
54+
<!-- Add screenshots to help explain your changes -->
55+
56+
## Breaking Changes
57+
58+
<!-- If this is a breaking change, describe the impact and migration path -->
59+
- **Breaking:** [description of breaking change]
60+
- **Migration:** [how to migrate existing code]
61+
62+
## Additional Notes
63+
64+
<!-- Any additional information that reviewers should know -->
65+
66+
---
67+
68+
**Reviewers:** @Sensible-Analytics/engineering
69+
70+
**Related Issues:** Fixes #, Relates to #

.github/dependabot.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Dependabot configuration for TypeScript/JavaScript projects
2+
# Template for: folio, CardScannerApp, crewcircle, rental-app
3+
4+
version: 2
5+
6+
updates:
7+
# npm packages - Weekly check with grouping
8+
- package-ecosystem: "npm"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
day: "monday"
13+
time: "09:00"
14+
timezone: "Australia/Sydney"
15+
open-pull-requests-limit: 10
16+
versioning-strategy: increase-if-necessary
17+
labels:
18+
- "dependencies"
19+
- "npm"
20+
reviewers:
21+
- "Sensible-Analytics/engineering"
22+
commit-message:
23+
prefix: "chore(deps)"
24+
include: "scope"
25+
groups:
26+
# Group production dependencies
27+
production:
28+
dependency-type: "production"
29+
update-types:
30+
- "minor"
31+
- "patch"
32+
# Group development dependencies
33+
development:
34+
dependency-type: "development"
35+
update-types:
36+
- "minor"
37+
- "patch"
38+
# Security updates (always separate)
39+
security:
40+
patterns:
41+
- "*"
42+
update-types:
43+
- "patch"
44+
applies-to: security-updates
45+
ignore:
46+
# Ignore major updates initially (manual review required)
47+
- dependency-name: "*"
48+
update-types: ["version-update:semver-major"]
49+
50+
# GitHub Actions - Weekly check
51+
- package-ecosystem: "github-actions"
52+
directory: "/"
53+
schedule:
54+
interval: "weekly"
55+
day: "monday"
56+
time: "09:00"
57+
timezone: "Australia/Sydney"
58+
open-pull-requests-limit: 20
59+
labels:
60+
- "dependencies"
61+
- "github-actions"
62+
reviewers:
63+
- "Sensible-Analytics/engineering"
64+
commit-message:
65+
prefix: "ci"
66+
include: "scope"
67+
groups:
68+
actions:
69+
patterns:
70+
- "*"
71+
rebase-strategy: auto

0 commit comments

Comments
 (0)