Skip to content
Merged
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
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

Thanks for helping improve pluk. This project follows the same lightweight contribution expectations as other hivecommons tools.

See [ROADMAP.md](ROADMAP.md) for what has shipped, what is planned next and what is out of scope for now.

## Finding something to work on

- Browse [`good first issue`](https://github.com/hivecommons/pluk/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) for small, well-scoped tasks, or [`help wanted`](https://github.com/hivecommons/pluk/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) for work maintainers would welcome help with.
- pluk misclassified an agent CLI's output, or you want a new CLI supported? Use the [pattern request form](https://github.com/hivecommons/pluk/issues/new?template=pattern_request.yml) (`.github/ISSUE_TEMPLATE/pattern_request.yml`), or send the fix yourself by following [Adding or fixing a pattern set](#adding-or-fixing-a-pattern-set).
- Found a bug? Use the [bug report form](https://github.com/hivecommons/pluk/issues/new?template=bug_report.yml) (`.github/ISSUE_TEMPLATE/bug_report.yml`).
- Have an idea for a new feature? Use the [feature request form](https://github.com/hivecommons/pluk/issues/new?template=feature_request.yml) (`.github/ISSUE_TEMPLATE/feature_request.yml`).
- Ask setup and contributor questions on [Discord](https://hivecommons.dev/discord).
- Meet the maintainers at the biweekly [Hive Commons community meeting](https://docs.hivecommons.dev/docs/community/meetings).

## Local development

Requirements:
Expand Down
43 changes: 39 additions & 4 deletions test/community-links.test.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
// Guards the community entry points in the README and the issue chooser so
// they stay in step with the hivecommons/hive README Community line.
// Guards the community entry points in the README, the issue chooser and
// CONTRIBUTING.md so they stay in step with the hivecommons/hive README
// Community line.
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { existsSync, readFileSync } from 'node:fs';
import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';

const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
const README = readFileSync(join(ROOT, 'README.md'), 'utf8');
const CHOOSER = readFileSync(join(ROOT, '.github', 'ISSUE_TEMPLATE', 'config.yml'), 'utf8');
const TEMPLATES = join(ROOT, '.github', 'ISSUE_TEMPLATE');
const CHOOSER = readFileSync(join(TEMPLATES, 'config.yml'), 'utf8');
const CONTRIBUTING = readFileSync(join(ROOT, 'CONTRIBUTING.md'), 'utf8');
const ISSUES = 'https://github.com/hivecommons/pluk/issues';
const chooserUrls = [...CHOOSER.matchAll(/^\s+url:[ \t]*(\S+)$/gm)].map((m) => m[1]);

const COMMUNITY_LINKS = [
Expand All @@ -26,3 +30,34 @@ for (const [name, url] of COMMUNITY_LINKS) {
assert.ok(chooserUrls.includes(url), `.github/ISSUE_TEMPLATE/config.yml is missing ${url}`);
});
}

for (const label of ['good+first+issue', 'help+wanted']) {
test(`CONTRIBUTING.md links open "${label.replace(/\+/g, ' ')}" issues`, () => {
const url = `${ISSUES}?q=is%3Aissue+is%3Aopen+label%3A%22${label}%22`;
assert.ok(CONTRIBUTING.includes(`](${url})`), `CONTRIBUTING.md is missing ${url}`);
});
}

test('CONTRIBUTING.md links every issue form, and each linked form exists', () => {
const forms = [...CONTRIBUTING.matchAll(/\(https:\/\/github\.com\/hivecommons\/pluk\/issues\/new\?template=([^)\s]+)\)/g)].map((m) => m[1]);
for (const form of ['pattern_request.yml', 'bug_report.yml', 'feature_request.yml']) {
assert.ok(forms.includes(form), `CONTRIBUTING.md must link the ${form} issue form`);
}
for (const form of forms) {
assert.ok(existsSync(join(TEMPLATES, form)), `CONTRIBUTING.md links missing issue form ${form}`);
}
});

test('CONTRIBUTING.md links ROADMAP.md', () => {
assert.ok(CONTRIBUTING.includes('](ROADMAP.md)'), 'CONTRIBUTING.md is missing a ROADMAP.md link');
assert.ok(existsSync(join(ROOT, 'ROADMAP.md')), 'ROADMAP.md linked from CONTRIBUTING.md is missing');
});

for (const [name, url] of [
['Discord', 'https://hivecommons.dev/discord'],
['community meeting', 'https://docs.hivecommons.dev/docs/community/meetings'],
]) {
test(`CONTRIBUTING.md links the Hive Commons ${name}`, () => {
assert.ok(CONTRIBUTING.includes(`](${url})`), `CONTRIBUTING.md is missing ${url}`);
});
}
Loading