Skip to content

Commit 2d402b8

Browse files
author
Antonio Maiolo
committed
chore: add issue/PR templates and enforce issue linking
1 parent d99ae21 commit 2d402b8

7 files changed

Lines changed: 217 additions & 8 deletions

File tree

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Bug Report
2+
description: Report a bug or unexpected behavior
3+
title: "bug: "
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to report a bug!
10+
11+
- type: dropdown
12+
id: component
13+
attributes:
14+
label: Component
15+
description: Which part of Think is affected?
16+
options:
17+
- App (Desktop)
18+
- Backend
19+
- Extension (Chrome)
20+
- Multiple / Not sure
21+
validations:
22+
required: true
23+
24+
- type: textarea
25+
id: description
26+
attributes:
27+
label: Description
28+
description: What happened? What did you expect to happen?
29+
placeholder: |
30+
What happened:
31+
32+
What I expected:
33+
validations:
34+
required: true
35+
36+
- type: textarea
37+
id: steps
38+
attributes:
39+
label: Steps to Reproduce
40+
description: How can we reproduce this issue?
41+
placeholder: |
42+
1. Go to '...'
43+
2. Click on '...'
44+
3. See error
45+
validations:
46+
required: true
47+
48+
- type: textarea
49+
id: environment
50+
attributes:
51+
label: Environment
52+
description: OS, browser version, app version, etc.
53+
placeholder: |
54+
- OS: macOS 14.0
55+
- App version: v0.3.0
56+
- Browser: Chrome 120 (for extension)
57+
validations:
58+
required: false
59+
60+
- type: textarea
61+
id: logs
62+
attributes:
63+
label: Logs / Screenshots
64+
description: Any relevant error messages, logs, or screenshots
65+
validations:
66+
required: false

.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: Questions & Discussion
4+
url: https://github.com/AugmentedMind/think/discussions
5+
about: Ask questions or start a discussion
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Documentation
2+
description: Report missing, unclear, or incorrect documentation
3+
title: "docs: "
4+
labels: ["documentation"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Help us improve the documentation!
10+
11+
- type: textarea
12+
id: what
13+
attributes:
14+
label: What needs documenting?
15+
description: What topic, feature, or process needs better documentation?
16+
validations:
17+
required: true
18+
19+
- type: textarea
20+
id: current
21+
attributes:
22+
label: Current State
23+
description: What does the current documentation say (if anything)?
24+
placeholder: The README mentions X but doesn't explain how to...
25+
validations:
26+
required: false
27+
28+
- type: textarea
29+
id: suggestion
30+
attributes:
31+
label: Suggested Improvement
32+
description: What would you like to see documented?
33+
validations:
34+
required: true
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Feature Request
2+
description: Suggest a new feature or enhancement
3+
title: "feat: "
4+
labels: ["enhancement"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for your feature suggestion!
10+
11+
- type: dropdown
12+
id: component
13+
attributes:
14+
label: Component
15+
description: Which part of Think would this affect?
16+
options:
17+
- App (Desktop)
18+
- Backend
19+
- Extension (Chrome)
20+
- Multiple / Not sure
21+
validations:
22+
required: true
23+
24+
- type: textarea
25+
id: problem
26+
attributes:
27+
label: Problem / Motivation
28+
description: What problem does this solve? Why do you need this?
29+
placeholder: I'm always frustrated when...
30+
validations:
31+
required: true
32+
33+
- type: textarea
34+
id: solution
35+
attributes:
36+
label: Proposed Solution
37+
description: How would you like this to work?
38+
validations:
39+
required: true
40+
41+
- type: textarea
42+
id: alternatives
43+
attributes:
44+
label: Alternatives Considered
45+
description: Any other approaches you've thought about?
46+
validations:
47+
required: false
48+
49+
- type: textarea
50+
id: context
51+
attributes:
52+
label: Additional Context
53+
description: Screenshots, mockups, or other relevant information
54+
validations:
55+
required: false

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## Summary
2+
<!-- Brief description of changes -->
3+
4+
## Issue
5+
<!-- Link to related issue (required) -->
6+
Closes #
7+
8+
## Test Plan
9+
<!-- How to verify this works -->
10+
- [ ]

.github/workflows/pr-check.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: PR Check
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, reopened]
6+
7+
jobs:
8+
check-issue-reference:
9+
name: Check Issue Reference
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check for Issue Link
13+
uses: actions/github-script@v7
14+
with:
15+
script: |
16+
const body = context.payload.pull_request.body || '';
17+
18+
// Match patterns: Closes #123, Fixes #123, Resolves #123, or just #123
19+
const issuePattern = /(close[sd]?|fix(e[sd])?|resolve[sd]?)\s*#\d+|#\d+/i;
20+
21+
if (!issuePattern.test(body)) {
22+
core.setFailed(
23+
'PR must reference an Issue.\n\n' +
24+
'Please add one of the following to your PR description:\n' +
25+
' - Closes #<issue-number>\n' +
26+
' - Fixes #<issue-number>\n' +
27+
' - Resolves #<issue-number>\n\n' +
28+
'If no issue exists, please create one first: https://github.com/' +
29+
context.repo.owner + '/' + context.repo.repo + '/issues/new/choose'
30+
);
31+
}

CONTRIBUTING.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@ Thanks for your interest in contributing!
44

55
## Reporting Issues
66

7-
- Search existing issues before opening a new one
8-
- Include steps to reproduce, expected vs actual behavior
9-
- For bugs, include your OS and relevant versions
7+
Before opening an issue, search existing issues to avoid duplicates.
8+
9+
**Use the issue templates:**
10+
- **Bug Report** - Something isn't working as expected
11+
- **Feature Request** - Suggest a new feature or enhancement
12+
- **Documentation** - Report missing or unclear docs
13+
14+
Blank issues are disabled - please use one of the templates above.
1015

1116
## Development Setup
1217

@@ -77,11 +82,14 @@ Every PR that changes functionality should include a changeset.
7782

7883
## Pull Requests
7984

80-
1. Fork the repo and create your branch from `main`
81-
2. Make your changes
82-
3. Run `pnpm changeset` to create a changeset
83-
4. Test your changes locally
84-
5. Submit a PR with a clear description
85+
**Every PR must reference an Issue.** CI will fail if no issue is linked.
86+
87+
1. Create an issue first (bug, feature, or docs)
88+
2. Fork the repo and create your branch from `main`
89+
3. Make your changes
90+
4. Run `pnpm changeset` to create a changeset
91+
5. Test your changes locally
92+
6. Submit a PR with `Closes #<issue-number>` in the description
8593

8694
## Code Style
8795

0 commit comments

Comments
 (0)