Skip to content

Commit f650cca

Browse files
authored
feat: improve contributing experience (#136)
* build: improve exemptions for stale issues * docs: add initial contributing guide * chore: add issue templates --------- Co-authored-by: Richard Herman <geekyeggo@users.noreply.github.com>
1 parent b296cd9 commit f650cca

File tree

5 files changed

+263
-0
lines changed

5 files changed

+263
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Bug report
2+
description: Report a bug or issue.
3+
labels: ["triage"]
4+
type: "Bug"
5+
6+
body:
7+
- type: textarea
8+
attributes:
9+
label: Description
10+
description: A clear and concise description of what the bug is.
11+
placeholder: What happened?
12+
validations:
13+
required: true
14+
15+
- type: textarea
16+
attributes:
17+
label: Steps to Reproduce
18+
description: Steps to reproduce the behavior.
19+
placeholder: |
20+
1. Call the first function
21+
2. Call the second function
22+
3. See error
23+
validations:
24+
required: true
25+
26+
- type: textarea
27+
attributes:
28+
label: Expected vs Actual Behavior
29+
description: What did you expect to happen, and what actually happened?
30+
validations:
31+
required: true
32+
33+
- type: input
34+
attributes:
35+
label: SDK Version
36+
description: Which version of the Stream Deck SDK are you using?
37+
placeholder: e.g., 1.0.0
38+
validations:
39+
required: true
40+
41+
- type: input
42+
attributes:
43+
label: Node.js Version
44+
description: Which version of Node.js are you using?
45+
placeholder: e.g., 20.5.1
46+
validations:
47+
required: true
48+
49+
- type: input
50+
attributes:
51+
label: Stream Deck Version
52+
description: Which version of Stream Deck are you using?
53+
placeholder: e.g., 7.2.0
54+
validations:
55+
required: true
56+
57+
- type: checkboxes
58+
attributes:
59+
label: OS
60+
description: Which operating system(s) did you observe this behavior on?
61+
options:
62+
- label: macOS
63+
- label: Windows
64+
validations:
65+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
blank_issues_enabled: true
2+
3+
contact_links:
4+
- name: Documentation
5+
url: https://docs.elgato.com/sdk/
6+
about: Check the official Stream Deck SDK documentation.
7+
8+
- name: Maker Discord
9+
url: https://discord.gg/GehBUcu627
10+
about: Join the community Discord for support and discussions.
11+
12+
- name: Community Support
13+
url: https://github.com/elgatosf/streamdeck/discussions
14+
about: Ask questions and discuss with the community.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Feature request
2+
description: Suggest a new feature or enhancement.
3+
labels: ["triage"]
4+
type: "Feature"
5+
6+
body:
7+
- type: textarea
8+
id: description
9+
attributes:
10+
label: Description
11+
description: Clear and concise summary of the feature being requested.
12+
validations:
13+
required: true
14+
15+
- type: textarea
16+
id: example
17+
attributes:
18+
label: Examples
19+
description: An example of how you envision this feature working, or references to similar implementations.
20+
placeholder: |
21+
```ts
22+
// Example usage
23+
```
24+
validations:
25+
required: true
26+
27+
- type: textarea
28+
id: impact
29+
attributes:
30+
label: Impact
31+
description: What problem does this feature solve, or what is the potential benefit.
32+
validations:
33+
required: true
34+
35+
- type: textarea
36+
id: alternatives
37+
attributes:
38+
label: Alternatives Considered
39+
description: Have you considered any alternative solutions or workarounds?
40+
41+
- type: checkboxes
42+
id: contribution
43+
attributes:
44+
label: Contribution
45+
description: Are you interested in contributing to implementing this feature?
46+
options:
47+
- label: I am interested in contributing

.github/workflows/close-stale-issues.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
with:
1919
close-issue-message: "This issue was closed because it has been inactive for one week since being marked as stale."
2020
stale-issue-label: "stale"
21+
exempt-issue-labels: "on hold,planned,triage"
22+
exempt-issue-milestones: true
2123
# Never mark PRs as stale
2224
days-before-pr-stale: -1
2325
days-before-pr-close: -1

CONTRIBUTING.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# Contributing to Stream Deck SDK
2+
3+
Thank you for your interest in contributing to the Stream Deck SDK! We welcome contributions from the community and are grateful for your support.
4+
5+
## Table of Contents
6+
7+
- [Code of Conduct](#code-of-conduct)
8+
- [Contributing](#contributing)
9+
- [Feature Requests](#feature-requests)
10+
- [Fixing Issues](#fixing-issues)
11+
- [AI Policy](#ai-policy)
12+
- [Development](#development)
13+
- [Prerequisites](#rrerequisites)
14+
- [Installation](#installation)
15+
- [Testing](#testing)
16+
- [Running Tests](#running-tests)
17+
- [Writing Tests](#writing-tests)
18+
- [Code Style](#code-style)
19+
- [Linting](#linting)
20+
- [Style Guidelines](#style-guidelines)
21+
22+
## Code of Conduct
23+
24+
By participating in this project, you agree to maintain a respectful and inclusive environment for all contributors. Please be considerate and professional in all interactions.
25+
26+
## Contributing
27+
28+
Before submitting a pull request, we kindly ask that you first create an issue to discuss your proposed changes. This helps ensure that your contribution aligns with the project's goals, and allows maintainers and the community to provide feedback early in the process.
29+
30+
### Feature Requests
31+
32+
We welcome feature requests; to propose a new feature:
33+
34+
1. Search existing issues to see if it has already been requested.
35+
2. Create a new issue if needed, including:
36+
- The problem it solves.
37+
- How you envision it working.
38+
- Any alternatives you've considered.
39+
- Whether you're willing to contribute the implementation.
40+
41+
### Fixing Issues
42+
43+
If you find a bug or have a problem with the SDK:
44+
45+
1. Search existing issues to see if it has already been reported.
46+
2. Create a new issue if needed.
47+
48+
## AI Policy
49+
50+
We welcome contributions that leverage AI tools as assistants in the development process. However, we require that:
51+
52+
- You must fully understand all code you submit.
53+
- You are responsible for the quality and correctness of your code.
54+
- Automated or low-quality AI pull requests will be rejected.
55+
56+
## Development
57+
58+
### Prerequisites
59+
60+
- **Node.js v20.5.1 or higher** - we recommend using a version manager such as [nvm](https://github.com/nvm-sh/nvm) (macOS) or [nvm-windows](https://github.com/coreybutler/nvm-windows) (Windows).
61+
- **npm** (comes with Node.js).
62+
63+
### Installation
64+
65+
1. Install dependencies:
66+
67+
```bash
68+
npm install
69+
```
70+
71+
2. Build the project:
72+
73+
```bash
74+
npm run build
75+
```
76+
77+
3. Watch for changes during development:
78+
```bash
79+
npm run watch
80+
```
81+
82+
## Testing
83+
84+
We use [Vitest](https://vitest.dev/) for testing. Please ensure all tests pass before submitting your changes.
85+
86+
### Running Tests
87+
88+
- Run all tests:
89+
90+
```bash
91+
npm test
92+
```
93+
94+
- Run tests in watch mode:
95+
96+
```bash
97+
npm run test:watch
98+
```
99+
100+
- Run tests with coverage:
101+
```bash
102+
npm run test:coverage
103+
```
104+
105+
### Writing Tests
106+
107+
- Place test files in `__tests__` directories next to the code they test
108+
- Name test files with the `.test.ts` pattern (e.g., `action.test.ts`)
109+
- Write clear, descriptive test names that explain what is being tested
110+
- Aim for high test coverage, especially for public APIs and critical functionality
111+
112+
## Code Style
113+
114+
This project uses ESLint and Prettier to maintain consistent code style.
115+
116+
### Linting
117+
118+
- Check for linting errors:
119+
120+
```bash
121+
npm run lint
122+
```
123+
124+
- Auto-fix linting and formatting issues:
125+
```bash
126+
npm run lint:fix
127+
```
128+
129+
### Style Guidelines
130+
131+
- Use TypeScript for all code.
132+
- Follow existing patterns and conventions in the codebase.
133+
- Write clear, self-documenting code with meaningful variable and function names.
134+
- Add JSDoc comments for public APIs.
135+
- Keep functions focused and concise.

0 commit comments

Comments
 (0)