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
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ contact_links:
- name: Join our Discord
url: https://hivecommons.dev/discord
about: Ask questions and talk with the Hive Commons community.
- name: Watch the hive live on Twitch
url: https://hivecommons.dev/twitch
about: Live stream of the hosted hive's Activity Monitor — see issues and PRs move through the pipeline in real time.
- name: Propose a project to join Hive Commons
url: https://github.com/hivecommons/.github/issues/new?template=join-hive-commons.yml
about: Project proposals for the Hive Commons family are handled in the hivecommons/.github repository.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ red PR job against.
- `node --test scripts/issue-forms.test.mjs` — static gate over `.github/ISSUE_TEMPLATE/`:
`config.yml` and every form parse and `blank_issues_enabled` is boolean; every
`contact_links[].url` is `https` and a `hivecommons.dev` URL resolves to a committed
page; `body[].id` is unique within a form and every `type` is one of GitHub's five
page, and the chooser links the `/discord` and `/twitch` shortcuts; `body[].id` is unique within a form and every `type` is one of GitHub's five
form element types; every `labels[]` entry is in `KNOWN_LABELS`. GitHub silently falls
back to a blank issue when a form fails to parse, so CI would otherwise stay green on a
broken form. Each rule has a fixture self-test. Zero dependencies.
Expand Down
6 changes: 6 additions & 0 deletions scripts/issue-forms.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ test("config.yml parses and its contact links are sound", () => {
assert.deepEqual(configProblems(cfg, siteHas), []);
});

test("config.yml links the community channels the homepage lists", () => {
const cfg = parseYaml(readFileSync(join(DIR, "config.yml"), "utf8"));
const urls = cfg.contact_links.map((l) => l.url);
for (const path of ["/discord", "/twitch"]) assert.ok(urls.includes(`https://hivecommons.dev${path}`), `no contact link to ${path}`);
});

test("every issue form parses and is sound", () => {
const forms = readdirSync(DIR).filter((n) => /\.ya?ml$/.test(n) && n !== "config.yml");
assert.ok(forms.length > 0, "no issue forms found");
Expand Down
Loading