File tree 4 files changed +15
-13
lines changed
4 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ inputs:
20
20
github-app :
21
21
description : ' BrowserStack Github App'
22
22
required : false
23
- default : ' browserstack[bot]'
23
+ default : ' browserstack-integrations [bot]'
24
24
runs :
25
25
using : ' node20'
26
26
main : ' dist/index.js'
Original file line number Diff line number Diff line change @@ -9597,18 +9597,19 @@ class InputValidator {
9597
9597
9598
9598
/**
9599
9599
* Validates the app name input to ensure it is a valid non-empty string.
9600
- * If the input is 'none' or not provided, it returns 'browserstack[bot]'.
9600
+ * If the input is 'none' or not provided, it returns 'browserstack-integrations [bot]'.
9601
9601
* @param {string} githubAppName Input for 'github-app'
9602
- * @returns {string} Validated app name, or 'browserstack[bot]' if input is 'none' or invalid
9602
+ * @returns {string} Validated app name, or 'browserstack-integrations[bot]'
9603
+ * if input is 'none' or invalid
9603
9604
* @throws {Error} If the input is not a valid non-empty string
9604
9605
*/
9605
9606
static validateGithubAppName(githubAppName) {
9606
9607
if (typeof githubAppName !== 'string') {
9607
9608
throw new Error("Invalid input for 'github-app'. Must be a valid string.");
9608
9609
}
9609
9610
9610
- if (githubAppName.toLowerCase() === 'browserstack[bot]') {
9611
- return 'browserstack[bot]';
9611
+ if (githubAppName.toLowerCase() === 'browserstack-integrations [bot]') {
9612
+ return 'browserstack-integrations [bot]';
9612
9613
}
9613
9614
9614
9615
if (githubAppName.trim().length > 0) {
Original file line number Diff line number Diff line change @@ -117,18 +117,19 @@ class InputValidator {
117
117
118
118
/**
119
119
* Validates the app name input to ensure it is a valid non-empty string.
120
- * If the input is 'none' or not provided, it returns 'browserstack[bot]'.
120
+ * If the input is 'none' or not provided, it returns 'browserstack-integrations [bot]'.
121
121
* @param {string } githubAppName Input for 'github-app'
122
- * @returns {string } Validated app name, or 'browserstack[bot]' if input is 'none' or invalid
122
+ * @returns {string } Validated app name, or 'browserstack-integrations[bot]'
123
+ * if input is 'none' or invalid
123
124
* @throws {Error } If the input is not a valid non-empty string
124
125
*/
125
126
static validateGithubAppName ( githubAppName ) {
126
127
if ( typeof githubAppName !== 'string' ) {
127
128
throw new Error ( "Invalid input for 'github-app'. Must be a valid string." ) ;
128
129
}
129
130
130
- if ( githubAppName . toLowerCase ( ) === 'browserstack[bot]' ) {
131
- return 'browserstack[bot]' ;
131
+ if ( githubAppName . toLowerCase ( ) === 'browserstack-integrations [bot]' ) {
132
+ return 'browserstack-integrations [bot]' ;
132
133
}
133
134
134
135
if ( githubAppName . trim ( ) . length > 0 ) {
Original file line number Diff line number Diff line change @@ -154,12 +154,12 @@ describe('InputValidator class to validate individual fields of the action input
154
154
} ) ;
155
155
156
156
context ( 'Validates GitHub App Name' , ( ) => {
157
- it ( "Returns 'browserstack[bot]' if the app name is not provided" , ( ) => {
157
+ it ( "Returns 'browserstack-integrations [bot]' if the app name is not provided" , ( ) => {
158
158
expect ( ( ) => InputValidator . validateGithubAppName ( ) ) . to . throw ( "Invalid input for 'github-app'. Must be a valid string." ) ;
159
159
} ) ;
160
160
161
- it ( "Returns 'browserstack[bot]' if the app name is 'browserstack[bot]' (case insensitive)" , ( ) => {
162
- expect ( InputValidator . validateGithubAppName ( 'BrowserStack[BOT]' ) ) . to . eq ( 'browserstack[bot]' ) ;
161
+ it ( "Returns 'browserstack-integrations [bot]' if the app name is 'browserstack-integrations [bot]' (case insensitive)" , ( ) => {
162
+ expect ( InputValidator . validateGithubAppName ( 'BrowserStack-integrations [BOT]' ) ) . to . eq ( 'browserstack-integrations [bot]' ) ;
163
163
} ) ;
164
164
165
165
it ( 'Throws an error if the app name is an empty string' , ( ) => {
@@ -170,7 +170,7 @@ describe('InputValidator class to validate individual fields of the action input
170
170
expect ( ( ) => InputValidator . validateGithubAppName ( 123 ) ) . to . throw ( "Invalid input for 'github-app'. Must be a valid string." ) ;
171
171
} ) ;
172
172
173
- it ( 'Returns the app name if it is a valid non-empty string and not "browserstack[bot]"' , ( ) => {
173
+ it ( 'Returns the app name if it is a valid non-empty string and not "browserstack-integrations [bot]"' , ( ) => {
174
174
const validAppName = 'someValidAppName' ;
175
175
expect ( InputValidator . validateGithubAppName ( validAppName ) ) . to . eq ( validAppName ) ;
176
176
} ) ;
You can’t perform that action at this time.
0 commit comments