hdoc-tools 0.17.22 → 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 +17 -0
  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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hdoc-tools",
3
- "version": "0.17.22",
3
+ "version": "0.17.23",
4
4
  "description": "Hornbill HDocBook Development Support Tool",
5
5
  "main": "hdoc.js",
6
6
  "bin": {