Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Bug report
description: Something isn't working
title: "[Bug] "
labels: bug, contributor-friendly
---

**Describe the bug**
A clear description of what’s wrong.

**To reproduce**
Steps to reproduce:
1. …
2. …

**Expected behavior**
What you expected.

**Environment**
- Browser / OS (if relevant)
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
blank_issues_enabled: true
contact_links: []
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Feature request
description: Suggest an improvement or new feature
title: "[Enhancement] "
labels: enhancement, contributor-friendly
---

**Describe the feature**
What you’d like to see.

**Why it’s useful**
Brief use case or problem it solves.

**Optional: possible implementation**
Rough idea of how it could work.
54 changes: 54 additions & 0 deletions .github/workflows/auto-label-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Auto-label issues (bug, enhancement, good first issue, maintainer vs contributor)
name: Auto-label issues

on:
issues:
types: [opened, edited]

permissions:
issues: write

jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Label issue
uses: actions/github-script@v7
with:
script: |
const issue = context.payload.issue;
const title = (issue.title || '').toLowerCase();
const body = (issue.body || '').toLowerCase();
const text = title + ' ' + body;

const labelsToAdd = [];

if (/\b(bug|fix|broken|error|fixes)\b/.test(text)) {
labelsToAdd.push('bug');
}
if (/\b(feature|enhancement|improvement)\b/.test(text)) {
labelsToAdd.push('enhancement');
}
if (/\b(doc|readme|documentation)\b/.test(text)) {
labelsToAdd.push('documentation');
}
if (/\b(good first issue|first issue|starter)\b/.test(text)) {
labelsToAdd.push('good first issue');
}

if (/\[maintainer\]|maintainer only|internal\b/.test(text)) {
labelsToAdd.push('maintainer-only');
} else {
labelsToAdd.push('contributor-friendly');
}

const existing = (issue.labels || []).map(l => l.name);
const toAdd = labelsToAdd.filter(l => !existing.includes(l));
if (toAdd.length === 0) return;

await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
labels: toAdd
});
46 changes: 46 additions & 0 deletions .github/workflows/auto-label-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Auto-label PRs when opened/edited (bug, enhancement, documentation, etc.)
name: Auto-label PRs

on:
pull_request:
types: [opened, edited]

permissions:
pull-requests: write
contents: read

jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Label PR
uses: actions/github-script@v7
with:
script: |
const pr = context.payload.pull_request;
const title = (pr.title || '').toLowerCase();
const body = (pr.body || '').toLowerCase();
const text = title + ' ' + body;

const labelsToAdd = [];

if (/\b(bug|fix|fixes|broken)\b/.test(text)) {
labelsToAdd.push('bug');
}
if (/\b(feature|enhancement|improvement)\b/.test(text)) {
labelsToAdd.push('enhancement');
}
if (/\b(doc|readme|documentation)\b/.test(text)) {
labelsToAdd.push('documentation');
}

const existing = (pr.labels || []).map(l => l.name);
const toAdd = labelsToAdd.filter(l => !existing.includes(l));
if (toAdd.length === 0) return;

await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
labels: toAdd
});
60 changes: 60 additions & 0 deletions .github/workflows/welcome-new-contributors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Welcome new contributors (per project doc: "Pull requests are welcome. Found a bug? Open an issue.")
name: Welcome new contributors

on:
issues:
types: [opened]
pull_request:
types: [opened]

permissions:
issues: write
pull-requests: write

jobs:
welcome:
runs-on: ubuntu-latest
steps:
- name: Welcome on first issue
if: github.event_name == 'issues'
uses: actions/github-script@v7
with:
script: |
const author = context.payload.issue.user.login;
const repo = context.repo;
const { data: issueData } = await github.rest.search.issuesAndPullRequests({
q: `repo:${repo.owner}/${repo.repo} is:issue author:${author}`
});
const isFirstIssue = issueData.total_count <= 1;
const welcome = isFirstIssue
? 'Welcome to the project! '
: '';
const body = welcome + 'Thanks for opening this issue. Pull requests are welcome—see [CONTRIBUTING](https://github.com/' + repo.owner + '/' + repo.repo + '/blob/main/CONTRIBUTING.md) for guidelines. Found a bug? Describe steps to reproduce and we\'ll label it.';
await github.rest.issues.createComment({
owner: repo.owner,
repo: repo.repo,
issue_number: context.payload.issue.number,
body
});

- name: Welcome on first PR
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const author = context.payload.pull_request.user.login;
const repo = context.repo;
const { data: prData } = await github.rest.search.issuesAndPullRequests({
q: `repo:${repo.owner}/${repo.repo} is:pr author:${author}`
});
const isFirstPR = prData.total_count <= 1;
const welcome = isFirstPR
? 'Welcome to the project! '
: '';
const body = welcome + 'Thanks for your pull request. See [CONTRIBUTING](https://github.com/' + repo.owner + '/' + repo.repo + '/blob/main/CONTRIBUTING.md) for guidelines. We\'ll review as soon as we can.';
await github.rest.issues.createComment({
owner: repo.owner,
repo: repo.repo,
issue_number: context.payload.pull_request.number,
body
});
34 changes: 34 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Contributing to Eye Lab

Thanks for your interest in contributing. Pull requests are welcome, and if you find a bug, please open an issue.

## Getting started

1. **Fork and clone** this repo.
2. **Install dependencies** (see [README](README.md#-local-setup)):
```bash
npm install
npm run serve
```
3. **Open an issue** before larger changes so we can align on approach.
4. **Branch** from `main` and keep changes focused (e.g. one fix or feature per PR).

## What to work on

- **Good first issue** – Labeled issues that are suited for new contributors.
- **Bug** – Something broken; please describe steps to reproduce.
- **Enhancement** – New feature or improvement; describe the use case.

Maintainer-only or internal tasks are labeled separately; everything else is open for contributors.

## Pull requests

- Target the `main` branch.
- Keep the PR small and the description clear.
- Ensure `npm run build` passes locally.

We’ll review as soon as we can. Thanks for contributing.

---

**Note for maintainers:** The repo uses auto-labeling. Ensure these labels exist: `bug`, `enhancement`, `documentation`, `good first issue`, `maintainer-only`, `contributor-friendly`.