Skip to content

Commit 0097638

Browse files
committed
Increase timeout
1 parent d308e94 commit 0097638

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

badges/coverage.svg

Lines changed: 1 addition & 1 deletion
Loading

dist/index.js

Lines changed: 8 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/actions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export async function createClass(
4949
// Sleep 5s to wait for the repo to be created and initial commit pushed.
5050
/* istanbul ignore next */
5151
if (process.env.NODE_ENV !== 'test')
52-
await new Promise((resolve) => setTimeout(resolve, 5000))
52+
await new Promise((resolve) => setTimeout(resolve, 10000))
5353

5454
await repos.configure(octokit, classroom, repo)
5555
}
@@ -147,7 +147,7 @@ export async function addUser(
147147
// Sleep 5s to wait for the repo to be created and initial commit pushed.
148148
/* istanbul ignore next */
149149
if (process.env.NODE_ENV !== 'test')
150-
await new Promise((resolve) => setTimeout(resolve, 5000))
150+
await new Promise((resolve) => setTimeout(resolve, 10000))
151151

152152
await repos.configure(octokit, classroom, repo)
153153

@@ -263,7 +263,7 @@ export async function addAdmin(
263263
// Sleep 5s to wait for the repo to be created and initial commit pushed.
264264
/* istanbul ignore next */
265265
if (process.env.NODE_ENV !== 'test')
266-
await new Promise((resolve) => setTimeout(resolve, 5000))
266+
await new Promise((resolve) => setTimeout(resolve, 10000))
267267

268268
await repos.configure(octokit, classroom, repo)
269269

src/inputs.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,14 @@ export function getClassroom(): Classroom | undefined {
106106
return undefined
107107
}
108108

109+
// Validate the organization matches GitHub org slug conventions.
110+
if (!/^[a-zA-Z0-9-_]+$/.test(parsedFile.organization)) {
111+
core.error(
112+
'Organization Field Invalid (Only Alphanumeric, Hyphen, Underscore)'
113+
)
114+
return undefined
115+
}
116+
109117
return {
110118
githubServer:
111119
/* istanbul ignore next */ parsedFile.githubServer?.trim() ||

0 commit comments

Comments
 (0)