Skip to content

Commit c94bf93

Browse files
committed
Add GH_PR_CREATE and GH_ISSUE_CREATE to the playground replica.
1 parent 67b8359 commit c94bf93

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

tests/playground/replica.tsx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import { PopupRoot } from "@/components/PopupRoot"
22
import type { CommentStorage, CommentTableRow } from "@/entrypoints/background"
33
import type { CommentSpot } from "@/lib/enhancer"
44
import type { GitHubIssueAppendSpot } from "@/lib/enhancers/github/GitHubIssueAppendEnhancer"
5+
import type { GitHubIssueCreateSpot } from "@/lib/enhancers/github/GitHubIssueCreateEnhancer"
56
import type { GitHubPrAppendSpot } from "@/lib/enhancers/github/GitHubPrAppendEnhancer"
7+
import type { GitHubPrCreateSpot } from "@/lib/enhancers/github/GitHubPrCreateEnhancer"
68

79
const gh_pr: GitHubPrAppendSpot = {
810
domain: "github.com",
@@ -12,6 +14,15 @@ const gh_pr: GitHubPrAppendSpot = {
1214
type: "GH_PR_APPEND",
1315
unique_key: "github.com:diffplug/selfie:517",
1416
}
17+
const gh_pr_new: GitHubPrCreateSpot = {
18+
base: "main",
19+
domain: "github.com",
20+
head: "cavia-porcellus:selfie:main",
21+
slug: "diffplug/selfie",
22+
title: "Update README.md",
23+
type: "GH_PR_CREATE",
24+
unique_key: "github.com:diffplug/selfie:main...cavia-porcellus:selfie:main",
25+
}
1526
const gh_issue: GitHubIssueAppendSpot = {
1627
domain: "github.com",
1728
number: 523,
@@ -20,8 +31,15 @@ const gh_issue: GitHubIssueAppendSpot = {
2031
type: "GH_ISSUE_APPEND",
2132
unique_key: "github.com:diffplug/selfie:523",
2233
}
34+
const gh_issue_new: GitHubIssueCreateSpot = {
35+
domain: "github.com",
36+
slug: "diffplug/gitcasso",
37+
title: "New issue title",
38+
type: "GH_ISSUE_CREATE",
39+
unique_key: "github.com:diffplug/gitcasso:new",
40+
}
2341

24-
const spots: CommentSpot[] = [gh_pr, gh_issue]
42+
const spots: CommentSpot[] = [gh_pr, gh_pr_new, gh_issue, gh_issue_new]
2543
const sampleSpots: CommentStorage[] = spots.map((spot) => {
2644
const state: CommentStorage = {
2745
drafts: [[0, "Lorem ipsum dolor sit amet, consectetur adipiscing elit."]],

0 commit comments

Comments
 (0)