Compare commits

..
Author SHA1 Message Date
Expo Bot 19ce4d3d29 [build-tools] Update Appium command list 2026-10-26 06:16:20 +00:00
4 changed files with 2 additions and 60 deletions

No files matched your search

-5
View File
@@ -1,5 +0,0 @@
---
'@expo/eas-build-job': patch
---
Add types and validation for documented GitHub workflow context fields.
@@ -184,6 +184,7 @@ export type XCUITestAppiumCommand =
| 'mobileGetIncreaseContrast'
| 'mobileGetPasteboard'
| 'mobileGetPermission'
| 'mobileGetPressableButtons'
| 'mobileGetSimulatedHingeAngle'
| 'mobileGetSimulatedLocation'
| 'mobileGetSource'
@@ -871,7 +871,7 @@ describe('StaticWorkflowInterpolationContextZ', () => {
});
describe('GitHub context event payload passthrough', () => {
it('preserves webhook fields and validates documented pull request details', () => {
it('accepts arbitrary fields at all event levels', () => {
const context = {
after: {},
needs: {},
@@ -895,19 +895,7 @@ describe('GitHub context event payload passthrough', () => {
},
pull_request: {
number: 123,
title: 'Fix the build',
body: null,
state: 'open',
draft: true,
merged: false,
html_url: 'https://github.com/expo/expo/pull/123',
user: { login: 'octocat', id: 1 },
labels: [{ name: 'bug', color: 'red' }],
head: { ref: 'fix-build', sha: 'abc123', repo: { name: 'expo' } },
base: { ref: 'main', sha: 'def456' },
created_at: '2026-10-01T00:00:00Z',
updated_at: '2026-10-02T00:00:00Z',
merged_at: null,
},
number: 123,
schedule: '0 0 * * *',
@@ -933,34 +921,6 @@ describe('GitHub context event payload passthrough', () => {
const parsed = StaticWorkflowInterpolationContextZ.parse(context);
expect(parsed.github?.event).toMatchObject(context.github.event);
expect(() =>
StaticWorkflowInterpolationContextZ.parse({
...context,
github: {
...context.github,
event: {
...context.github.event,
pull_request: { ...context.github.event.pull_request, title: 123 },
},
},
})
).toThrow();
});
it.each([
{ number: 123 },
{ number: 123, body: null, user: null, merged: null, merged_at: null },
])('accepts partial pull request payloads: %j', pullRequest => {
const github = {
event_name: 'pull_request',
sha: 'abc123',
ref: 'refs/heads/main',
ref_name: 'main',
ref_type: 'branch',
event: { pull_request: pullRequest },
};
expect(StaticWorkflowInterpolationContextZ.shape.github.parse(github)).toEqual(github);
});
});
-14
View File
@@ -207,7 +207,6 @@ const GitHubContextZ = z.object({
.record(z.string(), z.unknown())
.and(
z.object({
action: z.string().optional(),
label: z
.looseObject({
name: z.string(),
@@ -222,19 +221,6 @@ const GitHubContextZ = z.object({
pull_request: z
.looseObject({
number: z.number(),
title: z.string().optional(),
body: z.string().nullable().optional(),
state: z.enum(['open', 'closed']).optional(),
draft: z.boolean().optional(),
merged: z.boolean().nullable().optional(),
html_url: z.string().optional(),
user: z.looseObject({ login: z.string() }).nullable().optional(),
labels: z.array(z.looseObject({ name: z.string() })).optional(),
head: z.looseObject({ ref: z.string(), sha: z.string() }).optional(),
base: z.looseObject({ ref: z.string(), sha: z.string() }).optional(),
created_at: z.string().optional(),
updated_at: z.string().optional(),
merged_at: z.string().nullable().optional(),
})
.optional(),
number: z.number().optional(),