mirror of
https://github.com/tiennm99/is-a-good-dev.git
synced 2026-10-12 22:14:41 +00:00
chore: removing it from another file
This commit is contained in:
1 parent
d4a76268c3
commit
0e0cc45f6b
1 file changed
-10
@@ -15,16 +15,6 @@ function getJSON(file, filename) {
|
||||
const rawdata = fs.readFileSync(path); // Read the file
|
||||
const data = JSON.parse(rawdata); // Parse it
|
||||
|
||||
// Extract the file name without extension
|
||||
const fileNameWithoutExt = stripExt(file);
|
||||
|
||||
// Validate if the file name matches any of the target.RECORD_TYPE values
|
||||
const recordTypes = Object.keys(data.target);
|
||||
if (!recordTypes.includes(fileNameWithoutExt.toUpperCase())) {
|
||||
core.setOutput('infoMessage', `File name ${fileNameWithoutExt} does not match any target.RECORD_TYPE`);
|
||||
return false;
|
||||
}
|
||||
|
||||
return data; // Return the parsed data if validation passes
|
||||
}
|
||||
return 3; // It doesn't exist
|
||||
|
||||
Reference in new issue
Block a user