Skip to content

Commit 62b6f96

Browse files
feat(github): re-enable the bot dashboard on contributors docs (#155)
1 parent 7541137 commit 62b6f96

4 files changed

Lines changed: 39 additions & 1 deletion

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { ignore, unignore } from "../commands/ignore.js";
2+
import { update } from "../commands/update.js";
3+
import {
4+
HomeAssistantRepository,
5+
homeAssistantLinkRules,
6+
homeAssistantOrgRules,
7+
} from "./home-assistant-org.js";
8+
import type { RepoManifest } from "./types.js";
9+
10+
export const homeAssistantContributors: RepoManifest = {
11+
slug: HomeAssistantRepository.CONTRIBUTORS_HOME_ASSISTANT,
12+
dashboard: true,
13+
rules: [
14+
// Related PRs
15+
...homeAssistantLinkRules,
16+
17+
// Org-wide
18+
...homeAssistantOrgRules,
19+
],
20+
commands: [update, ignore, unignore],
21+
};

‎src/github/manifests/index.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { Command, RegistryConfig, RepoConfig, Rule } from "../engine/types.js";
22
import { esphomeOrg } from "./esphome-org.js";
33
import { homeAssistantBrands } from "./home-assistant-brands.js";
4+
import { homeAssistantContributors } from "./home-assistant-contributors.js";
45
import { homeAssistantCore } from "./home-assistant-core/index.js";
56
import { homeAssistantFrontend } from "./home-assistant-frontend.js";
67
import { homeAssistantIo } from "./home-assistant-io/index.js";
@@ -11,6 +12,7 @@ import type { OrgManifest, RepoManifest } from "./types.js";
1112
/** Repos with rules of their own. Add a repo by authoring a manifest and listing it here. */
1213
const MANIFESTS: RepoManifest[] = [
1314
homeAssistantBrands,
15+
homeAssistantContributors,
1416
homeAssistantCore,
1517
homeAssistantFrontend,
1618
homeAssistantIo,
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { describe, expect, it } from "vitest";
2+
import { registryConfig } from "../../../src/github/manifests/index.js";
3+
4+
const names = (items: readonly { name: string }[]) => items.map((item) => item.name);
5+
6+
describe("home-assistant/contributors.home-assistant.io", () => {
7+
it("runs a dashboard and the rules for PRs that belong together", () => {
8+
const config = registryConfig.repositories["home-assistant/contributors.home-assistant.io"];
9+
10+
expect(config.dashboard).toBe(true);
11+
expect(names(config.rules)).toEqual(
12+
expect.arrayContaining(["belongs-together", "poke-linked", "follow-parent"]),
13+
);
14+
expect(names(config.commands)).toEqual(["update", "ignore", "unignore"]);
15+
});
16+
});

‎tests/github/manifests/org-fallback.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ describe("org fallback", () => {
4141
"home-assistant/installer",
4242
"home-assistant/os-agent",
4343
"home-assistant/cli",
44-
"home-assistant/contributors.home-assistant.io",
4544
])("runs the home-assistant org rules on %s, without a dashboard", (repo) => {
4645
const { repoConfig } = contextFor(repo);
4746

0 commit comments

Comments
 (0)