-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: two method signatures and one property name have changed. **Objects & Properties** 1. readmeInspector.ReadmeScore - refactor:rename ReadmeScore ➡️ ReadmeAppraisal 2. module:readme-inspector/readme-score - refactor:rename 'ReadmeScore' module:readme-inspector/readme-appraisal 'ReadmeAppraisal', which is now a class. **Functions** 1. getReadmeInfo 1.1. Function name - refactor:rename ➡️ getInfo 1.2. Function signature - now expects a params object literal 2. getReadmeScore 2.1. Function name - refactor:rename ➡️ getAppraisal 2.2. Function signature remains the same as in 1.x.x. 3. check's signature now expects a params object literal, which it passes to getInfo. **API tests** Add API (integration) tests to verify appraisal initialization. 1. Create the lib/__apis__/ directory 2. Add Jest/Jasmine specs without mocks 3. Invoke real APIs for results **CI** 1. Create four ENV variables on Appveyor. 2. Customize greenkeeper commit messages **Documentation** - Use commonality branding colors for 'Request a Feature' and 'Report a Defect' badges - Move DEVELOPERS.md user the /docs/project/ directory - Add secure variables to for API testing - Iterate through filepaths with markdown files that require automated content generation GH-18,GH-21
- Loading branch information
1 parent
ad96ea5
commit 96546fe
Showing
128 changed files
with
46,438 additions
and
428 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
// Load all .env variables before anything else. | ||
|
||
const dotenvExtended = require('dotenv-extended') | ||
const envConfig = dotenvExtended.config() | ||
|
||
// Import readme-inspector. | ||
|
||
const readmeInspector = require('readme-inspector') | ||
|
||
// Recommended: authenticate to avoid rate limts. | ||
|
||
readmeInspector.authenticate({ | ||
token: envConfig.GH_TOKEN, | ||
type: 'oauth' | ||
}) | ||
|
||
// Verify that the repository with the slug | ||
// gregswindle/github-resource-converter | ||
// 1. Has a README, and | ||
// 2. Score the README for quality. | ||
|
||
const info = await readmeInspector.check( | ||
'gregswindle', | ||
'github-resource-converter' | ||
) | ||
|
||
// Display the resulting readmeInfo as a | ||
// JSON string. | ||
|
||
const WHITESPACE = 2 | ||
console.log(JSON.stringify(results, null, WHITESPACE)) | ||
// => | ||
/* | ||
{ | ||
"appraisal": { | ||
"breakdown": { | ||
"cumulativeCodeBlockLength": 0, | ||
"hasLists": 0, | ||
"lowCodeBlockPenalty": 0, | ||
"numberOfCodeBlocks": 0, | ||
"numberOfGifs": 0, | ||
"numberOfImages": 0, | ||
"numberOfNonCodeSections": 0 | ||
}, | ||
"error": null, | ||
"score": 0, | ||
"url": null | ||
}, | ||
"error": null, | ||
"isPresent": true, | ||
"value": { | ||
"name": "README.md", | ||
"path": "README.md", | ||
"sha": "4769744aad57ff3e9aac2df603795c4d10fcdc31", | ||
"size": 36877, | ||
"url": "https://api.github.com/repos/commonality/readme-inspector/contents/README.md?ref=master", | ||
"html_url": "https://github.com/commonality/readme-inspector/blob/master/README.md", | ||
"git_url": "https://api.github.com/repos/commonality/readme-inspector/git/blobs/4769744aad57ff3e9aac2df603795c4d10fcdc31", | ||
"download_url": "https://raw.githubusercontent.com/commonality/readme-inspector/master/README.md", | ||
"type": "file", | ||
"content": "{base64-encoding-of-readme-markdown}", | ||
"encoding": "base64", | ||
"_links": { | ||
"self": "https://api.github.com/repos/commonality/readme-inspector/contents/README.md?ref=master", | ||
"git": "https://api.github.com/repos/commonality/readme-inspector/git/blobs/4769744aad57ff3e9aac2df603795c4d10fcdc31", | ||
"html": "https://github.com/commonality/readme-inspector/blob/master/README.md" | ||
} | ||
} | ||
} | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.