hdoc-tools 0.17.21 → 0.17.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/hdoc-module.js +18 -1
  2. package/package.json +1 -1
package/hdoc-module.js CHANGED
@@ -344,6 +344,23 @@
344
344
  } else {
345
345
  response.last_commit_date = commit.commit.committer.date;
346
346
  }
347
+ } else if (commit.author && commit.author.id) {
348
+ if (!contributors[commit.author.id]) {
349
+ response.contributor_count++;
350
+ contributors[commit.author.id] = {
351
+ login: commit.author.login,
352
+ avatar_url: commit.author.avatar_url,
353
+ html_url: commit.author.html_url,
354
+ name: commit.commit.author.name
355
+ };
356
+ }
357
+ if (response.last_commit_date !== '') {
358
+ const new_commit_date = new Date(commit.commit.author.date);
359
+ const exist_commit_date = new Date(response.last_commit_date);
360
+ if (new_commit_date > exist_commit_date) response.last_commit_date = commit.commit.author.date;
361
+ } else {
362
+ response.last_commit_date = commit.commit.author.date;
363
+ }
347
364
  }
348
365
  });
349
366
  for (const key in contributors) {
@@ -449,7 +466,7 @@
449
466
  }
450
467
 
451
468
  if (!items[i].link && !items[i].items) {
452
- response.errors.push(`The following Nav Item is missing has no link or items property: ${JSON.stringify(items[i])}`);
469
+ response.errors.push(`The following Nav Item has no link or items property: ${JSON.stringify(items[i])}`);
453
470
  }
454
471
  const item = items[i];
455
472
  if (!parentlink && item.link) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hdoc-tools",
3
- "version": "0.17.21",
3
+ "version": "0.17.23",
4
4
  "description": "Hornbill HDocBook Development Support Tool",
5
5
  "main": "hdoc.js",
6
6
  "bin": {