Skip to content

Commit 02b0aea

Browse files
chore: add issue and PR templates
1 parent 5e56ec1 commit 02b0aea

File tree

5 files changed

+126
-0
lines changed

5 files changed

+126
-0
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'to triage'
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
12+
A clear and concise description of what the bug is.
13+
14+
**To Reproduce**
15+
16+
```ts
17+
import { serve } from "https://deno.land/std@a.b.c/http/server.ts";
18+
import { Server } from "https://deno.land/x/socket_io@x.y.z/mod.ts";
19+
20+
const io = new Server();
21+
22+
io.on("connection", (socket) => {
23+
console.log(`socket ${socket.id} connected`);
24+
25+
socket.emit("hello", "world");
26+
27+
socket.on("disconnect", (reason) => {
28+
console.log(`socket ${socket.id} disconnected due to ${reason}`);
29+
});
30+
});
31+
32+
await serve(io.handler(), {
33+
port: 3000,
34+
});
35+
```
36+
37+
**Expected behavior**
38+
39+
A clear and concise description of what you expected to happen.
40+
41+
**Screenshots**
42+
43+
If applicable, add screenshots to help explain your problem.
44+
45+
**Platform:**
46+
47+
- Device: [e.g. Samsung S8]
48+
- OS: [e.g. Android 9.2]
49+
50+
**Additional context**
51+
52+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Ask a Question
4+
url: https://github.com/socketio/socket.io-deno/discussions/new?category=q-a
5+
about: Ask the community for help
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: 'enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
12+
A clear and concise description of what the problem is. Ex. I'm always
13+
frustrated when [...]
14+
15+
**Describe the solution you'd like**
16+
17+
A clear and concise description of what you want to happen.
18+
19+
**Describe alternatives you've considered**
20+
21+
A clear and concise description of any alternative solutions or features you've
22+
considered.
23+
24+
**Additional context**
25+
26+
Add any other context or screenshots about the feature request here.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Bug fix
3+
about: A fix for a known issue
4+
title: ''
5+
labels: 'to triage'
6+
assignees: ''
7+
8+
---
9+
10+
Related issue or discussion:
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Feature implementation
3+
about: A new awesome feature
4+
title: ''
5+
labels: 'enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
Related issue or discussion:
11+
12+
**New behavior**
13+
14+
```ts
15+
import { serve } from "https://deno.land/std@a.b.c/http/server.ts";
16+
import { Server } from "https://deno.land/x/socket_io@x.y.z/mod.ts";
17+
18+
const io = new Server();
19+
20+
io.on("connection", (socket) => {
21+
console.log(`socket ${socket.id} connected`);
22+
23+
socket.emit("hello", "world");
24+
25+
socket.on("disconnect", (reason) => {
26+
console.log(`socket ${socket.id} disconnected due to ${reason}`);
27+
});
28+
});
29+
30+
await serve(io.handler(), {
31+
port: 3000,
32+
});
33+
```

0 commit comments

Comments
 (0)