chore(quality): provider fixtures, formatter snapshots, platform contract tests, CI, CodeQL, dependabot

This commit is contained in:
RhenCloud 2026-08-15 17:30:51 +08:00
parent 04fa52db52
commit 320e825bf8
No known key found for this signature in database
GPG key ID: A574A617378C4E0B
15 changed files with 405 additions and 3 deletions

9
tests/fixtures/custom.ts vendored Normal file
View file

@ -0,0 +1,9 @@
export const customPayload: Record<string, unknown> = {
deliveryId: "custom-123",
title: "Deploy finished",
repository: {
full_name: "acme/widget",
html_url: "https://github.com/acme/widget",
},
message: "The latest build was deployed to staging.",
};

20
tests/fixtures/gitea.ts vendored Normal file
View file

@ -0,0 +1,20 @@
export const giteaPush: Record<string, unknown> = {
ref: "refs/heads/main",
before: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
after: "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
compare_url: "https://git.example.com/acme/widget/compare/aaa...bbb",
commits: [
{
id: "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
message: "Fix login bug",
url: "https://git.example.com/acme/widget/commit/bbb",
timestamp: "2026-08-15T00:00:00Z",
author: { name: "Octocat", username: "octocat" },
},
],
repository: {
full_name: "acme/widget",
html_url: "https://git.example.com/acme/widget",
},
pusher: { login: "octocat" },
};

66
tests/fixtures/github.ts vendored Normal file
View file

@ -0,0 +1,66 @@
export const githubPush: Record<string, unknown> = {
ref: "refs/heads/main",
before: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
after: "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
compare: "https://github.com/acme/widget/compare/aaa...bbb",
head_commit: {
id: "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
message: "Fix login bug",
timestamp: "2026-08-15T00:00:00Z",
url: "https://github.com/acme/widget/commit/bbb",
author: { name: "Octocat", username: "octocat" },
},
repository: {
full_name: "acme/widget",
html_url: "https://github.com/acme/widget",
},
sender: { login: "octocat" },
pusher: { name: "octocat" },
commits: [
{
id: "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
message: "Fix login bug",
url: "https://github.com/acme/widget/commit/bbb",
timestamp: "2026-08-15T00:00:00Z",
author: { name: "Octocat", username: "octocat" },
},
],
};
export const githubPullRequest: Record<string, unknown> = {
action: "opened",
number: 7,
pull_request: {
number: 7,
title: "Add feature",
html_url: "https://github.com/acme/widget/pull/7",
state: "open",
user: { login: "octocat" },
body: "Implements the new feature.",
head: { ref: "feature" },
base: { ref: "main" },
merged: false,
},
repository: {
full_name: "acme/widget",
html_url: "https://github.com/acme/widget",
},
sender: { login: "octocat" },
};
export const githubIssues: Record<string, unknown> = {
action: "opened",
issue: {
number: 12,
title: "Broken login on mobile",
html_url: "https://github.com/acme/widget/issues/12",
state: "open",
user: { login: "octocat" },
body: "Login fails on iOS Safari.",
},
repository: {
full_name: "acme/widget",
html_url: "https://github.com/acme/widget",
},
sender: { login: "octocat" },
};

3
tests/fixtures/index.ts vendored Normal file
View file

@ -0,0 +1,3 @@
export { githubPush, githubPullRequest, githubIssues } from "./github";
export { giteaPush } from "./gitea";
export { customPayload } from "./custom";