Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
581ac6c
chore(ci): polish CI workflow and remove unused actions
May 14, 2026
265bf4b
feat(db): add clearAll collection helper
XueYuSky May 14, 2026
7606b61
feat(db): add clearAll collection helper (#29)
arpittkhandelwal May 14, 2026
82e285b
feat: add PR welcome bot workflow
arpittkhandelwal May 14, 2026
4bc897b
fix: add issues: write permission for welcome bot
arpittkhandelwal May 14, 2026
185aa9b
Merge pull request #292 from arpittkhandelwal/feat/add-pr-welcome-bot
arpittkhandelwal May 14, 2026
b5d7738
fix: resolve YAML syntax error in welcome bot
arpittkhandelwal May 14, 2026
bfe38f6
Merge branch 'feat/add-pr-welcome-bot-v2'
arpittkhandelwal May 14, 2026
c447c11
fix: remove emojis and simplify string to fix YAML syntax error
arpittkhandelwal May 14, 2026
6810795
chore: test commit for welcome bot
arpittkhandelwal May 14, 2026
a3f79b7
Merge pull request #295 from arpittkhandelwal/test/pr-welcome-bot-fix-v3
arpittkhandelwal May 14, 2026
5403a47
Delete .github/ISSUE_TEMPLATE/bug_report.yml
arpittkhandelwal May 14, 2026
c99785c
Merge pull request #301 from Zerith-Labs/arpittkhandelwal-patch-1
arpittkhandelwal May 14, 2026
a627fa0
docs: fix outdated paths in CONTRIBUTING.md
Dharshin1 May 15, 2026
75ce413
Merge pull request #461 from Dharshin1/fix-contributing-links
arpittkhandelwal May 15, 2026
758be6a
feat(ci): add issue auto-assignment and pr labeler workflows
arpittkhandelwal May 16, 2026
ac72fc3
chore(ci): resolve merge conflict in ci workflow
arpittkhandelwal May 16, 2026
a529ddb
Merge pull request #536 from Zerith-Labs/feat/issue-auto-assign
arpittkhandelwal May 16, 2026
6d0e640
feat(ci): add assignment check to issue workflow
arpittkhandelwal May 16, 2026
874383d
Merge pull request #550 from Zerith-Labs/feat/issue-assign-v2
arpittkhandelwal May 16, 2026
57cb73b
fix: resolve CI, validation, lint, and workflow issues
utkarshjain1338-hub May 26, 2026
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
5 changes: 5 additions & 0 deletions .changeset/clear-all-db-adapter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"zerithdb-db": patch
---

Add a `clearAll()` helper to remove every document from a collection.
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.yml

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ concurrency:
jobs:
# ── 1. Lint & Format ────────────────────────────────────────────────────────
lint-format:
name: Lint & Format
name: 🔍 Lint & Format
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:

# ── 2. TypeScript type-check ────────────────────────────────────────────────
typecheck:
name: TypeCheck
name: 🧠 TypeCheck
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -75,7 +75,7 @@ jobs:

# ── 3. Build & Unit Tests ───────────────────────────────────────────────────
build-and-test:
name: Build & Test
name: 🏗️ Build & Test
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:

# ── 4. Python SDK ───────────────────────────────────────────────────────────
python-sdk:
name: Python SDK (py${{ matrix.python }})
name: 🐍 Python SDK (py${{ matrix.python }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
# This is the single required status check to add in branch protection rules.
# All jobs must pass for this to succeed.
ci-success:
name: CI Passed
name: CI Passed
needs: [lint-format, typecheck, build-and-test, python-sdk]
runs-on: ubuntu-latest
if: always()
Expand Down
94 changes: 94 additions & 0 deletions .github/workflows/issue-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Issue Auto Assign

on:
issue_comment:
types: [created]

jobs:
assign:
name: Assign User
if: contains(github.event.comment.body, '/assign') || contains(github.event.comment.body, '/unassign')
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Process Assignment
uses: actions/github-script@v7
with:
script: |
const comment = context.payload.comment.body.trim().toLowerCase();
const issue_number = context.payload.issue.number;
const user = context.payload.comment.user.login;
const owner = context.repo.owner;
const repo = context.repo.repo;

// Check if comment starts with /assign or /unassign
if (comment.startsWith('/assign')) {
const assignees = context.payload.issue.assignees.map(a => a.login);

if (assignees.length > 0) {
if (assignees.includes(user)) {
await github.rest.issues.createComment({
owner,
repo,
issue_number,
body: `👋 Hi @${user}, you are already assigned to this issue!`
});
} else {
await github.rest.issues.createComment({
owner,
repo,
issue_number,
body: `⚠️ **Already Assigned**\n\nSorry @${user}, this issue is already assigned to @${assignees.join(', @')}. Please find another unassigned issue to contribute to! 🚀`
});
}
return;
}

console.log(`Assigning @${user} to issue #${issue_number}`);
try {
await github.rest.issues.addAssignees({
owner,
repo,
issue_number,
assignees: [user]
});

const message = `### ✅ Issue Assigned!\n\nHi @${user}, you have been successfully assigned to this issue. We're excited to see your contribution! 🚀\n\nIf you have any questions, feel free to ask here or join our [Discord server](https://discord.gg/mwCayEMK4h). Happy coding!`;

await github.rest.issues.createComment({
owner,
repo,
issue_number,
body: message
});
} catch (error) {
console.error(error);
await github.rest.issues.createComment({
owner,
repo,
issue_number,
body: `❌ **Failed to assign @${user}.**\n\nError: ${error.message}`
});
}
} else if (comment.startsWith('/unassign')) {
console.log(`Unassigning @${user} from issue #${issue_number}`);
try {
await github.rest.issues.removeAssignees({
owner,
repo,
issue_number,
assignees: [user]
});

await github.rest.issues.createComment({
owner,
repo,
issue_number,
body: `👋 @${user} has been unassigned from this issue.`
});
} catch (error) {
console.error(error);
}
}
99 changes: 99 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: "PR Labeler"

on:
pull_request_target:
types: [opened, synchronize, reopened, edited]

permissions:
contents: read
issues: read
pull-requests: write

jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Auto Label PR
uses: actions/github-script@v7
with:
script: |
const body = context.payload.pull_request.body || "";
const prNumber = context.payload.pull_request.number;

// Regex to find linked issues (e.g., "Fixes #123", "Closes #456")
const issueRegex = /(?:close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved)\s+#(\d+)/gi;
const linkedIssueIds = new Set();
let match;
while ((match = issueRegex.exec(body)) !== null) {
linkedIssueIds.add(match[1]);
}

const labelsToAdd = new Set();
labelsToAdd.add('gssoc-26'); // Default label for this repo
labelsToAdd.add('status: needs-review'); // Mark as needing review

// 1. Inherit labels from linked issues
if (linkedIssueIds.size > 0) {
console.log(`Found linked issues: ${Array.from(linkedIssueIds).join(', ')}`);
for (const id of linkedIssueIds) {
try {
const { data: issue } = await github.rest.issues.get({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: parseInt(id),
});
if (issue.labels) {
issue.labels.forEach(l => {
const labelName = typeof l === 'string' ? l : l.name;
labelsToAdd.add(labelName);
});
}
} catch (e) {
console.log(`Error fetching issue #${id}: ${e.message}`);
}
}
}

// 2. Path-based labeling (as fallback or addition)
try {
const { data: files } = await github.rest.pulls.listFiles({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: prNumber,
});

const filePaths = files.map(f => f.filename);

if (filePaths.some(p => p.startsWith('packages/db/'))) {
labelsToAdd.add('package:db');
}

if (filePaths.some(p => p.endsWith('.md') || p.startsWith('docs/'))) {
labelsToAdd.add('type:docs');
}

if (filePaths.some(p => p.toLowerCase().includes('test') || p.toLowerCase().includes('spec') || p.includes('__tests__'))) {
labelsToAdd.add('type:testing');
}

if (filePaths.some(p => p.startsWith('.github/') || p.includes('package.json') || p.includes('package-lock.json'))) {
labelsToAdd.add('type:chore');
}

if (filePaths.some(p => p.startsWith('infra/'))) {
labelsToAdd.add('type:devops');
}
} catch (e) {
console.log(`Error listing files: ${e.message}`);
}

// 3. Apply labels
if (labelsToAdd.size > 0) {
console.log(`Adding labels: ${Array.from(labelsToAdd).join(', ')}`);
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
labels: Array.from(labelsToAdd),
});
}
27 changes: 27 additions & 0 deletions .github/workflows/pr-welcome.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PR Welcome Bot

on:
pull_request_target:
types: [opened]

jobs:
welcome-comment:
name: Post Welcome Comment
runs-on: ubuntu-latest
permissions:
pull-requests: write
issues: write
steps:
- name: Welcome Comment
uses: actions/github-script@v7
with:
script: |
const creator = context.payload.pull_request.user.login;
const message = "### Hello @" + creator + "!\n\nOur reviewers will be checking your PR shortly. In the meantime, please join our Discord server to connect with the team and other contributors:\n\n**Join Discord:** https://discord.gg/mwCayEMK4h";

await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
body: message
});
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ constructive. Violations → `conduct@zerithdb.dev`
### Bootstrap

```bash
git clone https://github.com/YOUR_USERNAME/zerithdb.git
cd zerithdb
git clone https://github.com/YOUR_USERNAME/ZerithDB.git
cd ZerithDB
git remote add upstream https://github.com/Zerith-Labs/ZerithDB.git
pnpm install
pnpm build
Expand All @@ -49,7 +49,7 @@ pnpm dev # start all packages in watch mode
```bash
pnpm --filter zerithdb-db dev
pnpm --filter zerithdb-sync test
pnpm --filter zerithdb-todo-app dev
pnpm --filter zerithdb-sdk dev
```

---
Expand All @@ -62,7 +62,7 @@ pnpm --filter zerithdb-todo-app dev
[`good-first-issue`](https://github.com/Zerith-Labs/ZerithDB/issues?q=label%3Agood-first-issue) or
[`help-wanted`](https://github.com/Zerith-Labs/ZerithDB/issues?q=label%3Ahelp-wanted).
- For features, open a Discussion before writing code.
- Comment "I'll work on this" to claim an issue.
- Comment `/assign` to automatically claim an issue. Use `/unassign` if you can no longer work on it.

### 2. Branch Naming

Expand Down
Loading