Skip to content

Commit a83fdef

Browse files
committed
fix: handle both number and string status for 404 error in CLA file retrieval
1 parent 0ffaf78 commit a83fdef

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

actions/cla-assistant/dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

actions/cla-assistant/src/setupClaCheck.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,11 @@ async function getCLAFileContentandSHA(
6464
try {
6565
result = await getFileContent()
6666
} catch (error) {
67-
if (error.status === 404) {
67+
if (error.status === 404 || error.status === '404') {
6868
return createClaFileAndPRComment(committers, committerMap)
6969
} else {
7070
throw new Error(
71-
`Could not retrieve repository contents. Status: ${
72-
error.status || 'unknown'
73-
}`
71+
`Could not retrieve repository contents. Status: ${error.status || 'unknown'}`
7472
)
7573
}
7674
}

0 commit comments

Comments
 (0)