@@ -31,11 +31,11 @@ let githubHelper;
3131 * Get target tags
3232 * Collect commits
3333 * Make release note
34- * Post Github release
34+ * Post Github release
3535 */
3636function release ( ) {
3737 /* check could use github-api */
38- if ( ! isValidRepositoryUrl ( pkgJson ) || ! hasGitHubAccessToken ( ) ) {
38+ if ( ! isValidRepositoryUrl ( pkg ) || ! hasGitHubAccessToken ( ) ) {
3939 throw new Error ( ) ;
4040 }
4141
@@ -54,7 +54,7 @@ function release() {
5454
5555/**
5656 * Get Repository configured with access token, base url
57- * @returns {Repository } - repository
57+ * @returns {Repository } - repository
5858 * @see https://github.com/github-tools/github/blob/22b889cd48cd281812b020d85f8ea502af69ddfd/lib/Repository.js
5959 */
6060function getRepo ( ) {
@@ -69,6 +69,7 @@ function getRepo() {
6969
7070/**
7171 * Get repository url from package.json
72+ * @param {JSON } pkgJson - json object defined in package.json
7273 * @returns {string } - repository url
7374 */
7475function getRepositoryUrl ( pkgJson ) {
@@ -87,6 +88,7 @@ function getRepositoryUrl(pkgJson) {
8788
8889/**
8990 * Get Repository username, repository name
91+ * @param {JSON } pkgJson - json object defined in package.json
9092 * @returns {Object } - username and repository name
9193 */
9294function getRepositoryInfo ( pkgJson ) {
@@ -100,12 +102,13 @@ function getRepositoryInfo(pkgJson) {
100102
101103/**
102104 * test repository url on package.json is valid
105+ * @param {JSON } pkgJson - json object defined in package.json
103106 * @returns {boolean } - url validity
104107 */
105108function isValidRepositoryUrl ( pkgJson ) {
106109 const pass = GIT_REPO_REGEXP . test ( getRepositoryUrl ( pkgJson ) ) ;
107110 if ( ! pass ) {
108- console . error ( 'Wrong repository url on package.json' ) ;
111+ console . error ( 'Invalid repository url on package.json' ) ;
109112 }
110113
111114 return pass ;
@@ -157,7 +160,7 @@ function getCommitLogsUntilTag(tag) {
157160}
158161
159162/**
160- * Change to CommitObject
163+ * Change to CommitObject
161164 * @param {Array } commits - commits
162165 * @returns {Array } - filtered commits
163166 */
@@ -178,6 +181,7 @@ function filterCommits(commits) {
178181/**
179182 * Filter commit matches commit message conventions
180183 * @param {string } commitMessage - commit's first line
184+ * @returns {Array } - filtered commit objects
181185 */
182186function matchCommitMessage ( commitMessage ) {
183187 const captureGroup = commitMessage . match ( COMMIT_LOG_REGEXP ) ;
@@ -242,7 +246,7 @@ function makeReleaseNote(commits) {
242246/**
243247 * check commit type by regular expression of available types
244248 * @param {string } type - commit type
245- * @returns {number }
249+ * @returns {number }
246250 * - index: when commit type is matched by some type's
247251 * - -1: matches nothing
248252 */
0 commit comments