feat: renamed files/folders to lowercase
This commit is contained in:
committed by
mrugesh mohapatra
parent
df73a08b4e
commit
b8b14cb6dc
28
validation/guide-folder-checks/create-error-msg.js
Normal file
28
validation/guide-folder-checks/create-error-msg.js
Normal file
@@ -0,0 +1,28 @@
|
||||
const dedent = require("dedent");
|
||||
|
||||
const createErrorMsg = (errors, user) => {
|
||||
let errorMsgHeader = dedent`
|
||||
Hi @${user},
|
||||
|
||||
Thanks for this pull request (PR).
|
||||
|
||||
Unfortunately, these changes have failed some of our recommended guidelines. Please correct the issue(s) listed below, so we can consider merging your content.
|
||||
|
||||
| Issue | Description | File Path |
|
||||
| :---: | --- | --- |
|
||||
`;
|
||||
|
||||
let errorMsgTable = errors.reduce((msgStr, { msg, fullPath }, idx) => {
|
||||
return (msgStr += "\n" + dedent`
|
||||
| ${idx + 1} | ${msg} | ${fullPath} |
|
||||
`);
|
||||
}, "");
|
||||
|
||||
let errorMsgFooter = dedent`
|
||||
P.S: I am just friendly bot. Review our [Guidelines for Contributing](https://github.com/FreeCodeCamp/FreeCodeCamp/blob/master/CONTRIBUTING.md) and reach out to the [Contributors Chat room](https://gitter.im/FreeCodeCamp/Contributors) for more help.
|
||||
`;
|
||||
|
||||
return errorMsgHeader + errorMsgTable + "\n\n" + errorMsgFooter;
|
||||
};
|
||||
|
||||
module.exports = { createErrorMsg };
|
Reference in New Issue
Block a user