File tree Expand file tree Collapse file tree 2 files changed +6
-38
lines changed
Expand file tree Collapse file tree 2 files changed +6
-38
lines changed Original file line number Diff line number Diff line change 22 "name" : " dcd-github-action" ,
33 "description" : " run maestro tests on devicecloud.dev" ,
44 "author" : " devicecloud.dev" ,
5- "version" : " 1.2.1 " ,
5+ "version" : " 1.2.2 " ,
66 "main" : " src/index.ts" ,
77 "license" : " MIT" ,
88 "engines" : {
Original file line number Diff line number Diff line change @@ -53,53 +53,21 @@ function parseTags(tags?: string): string[] | null {
5353function parseAndroidDevice ( device ?: string ) : string | null {
5454 if ( device === undefined || device === '' ) return null ;
5555
56- if (
57- [
58- 'pixel-6' ,
59- 'pixel-6a' ,
60- 'pixel-6-pro' ,
61- 'pixel-7' ,
62- 'pixel-7-pro' ,
63- 'generic-tablet' ,
64- ] . includes ( device )
65- ) {
66- return device ;
67- }
68-
69- throw new Error ( `Invalid android device: ${ device } ` ) ;
56+ return device ;
7057}
58+
7159function parseIOSDevice ( device ?: string ) : string | null {
7260 if ( device === undefined || device === '' ) return null ;
7361
74- if (
75- [
76- 'iphone-12' ,
77- 'iphone-12-mini' ,
78- 'iphone-12-pro-max' ,
79- 'iphone-13' ,
80- 'iphone-13-mini' ,
81- 'iphone-13-pro-max' ,
82- 'iphone-14' ,
83- 'iphone-14-plus' ,
84- 'iphone-14-pro' ,
85- 'iphone-14-pro-max' ,
86- 'iphone-15' ,
87- 'iphone-15-plus' ,
88- 'iphone-15-pro' ,
89- 'iphone-15-pro-max' ,
90- 'ipad-pro-6th-gen' ,
91- ] . includes ( device )
92- ) {
93- return device ;
94- }
95-
96- throw new Error ( `Invalid ios device: ${ device } ` ) ;
62+ return device ;
9763}
64+
9865function getPullRequestTitle ( ) : string | undefined {
9966 const pullRequestTitle = github . context . payload . pull_request ?. title ;
10067 if ( pullRequestTitle === undefined ) return undefined ;
10168 return `${ pullRequestTitle } ` ;
10269}
70+
10371function getInferredName ( ) : string {
10472 const pullRequestTitle = getPullRequestTitle ( ) ;
10573 if ( pullRequestTitle ) return pullRequestTitle ;
You can’t perform that action at this time.
0 commit comments