question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I want to generate a log of the changes since the last tag,

github-changes -o [owner] -r [repo] -a --only-pulls --use-commit-body --between-tags 20.0.3...master

It takes ages and returns an error:

error TypeError: Cannot read property 'date' of null
    at /usr/local/lib/node_modules/github-changes/bin/index.js:394:61
    at Array.forEach (<anonymous>)
    at commitFormatter (/usr/local/lib/node_modules/github-changes/bin/index.js:393:8)
    at formatter (/usr/local/lib/node_modules/github-changes/bin/index.js:499:39)
    at /usr/local/lib/node_modules/github-changes/bin/index.js:563:35
    at tryCatch1 (/usr/local/lib/node_modules/github-changes/node_modules/bluebird/js/main/util.js:86:19)
    at Promise$_callHandler [as _callHandler] (/usr/local/lib/node_modules/github-changes/node_modules/bluebird/js/main/promise.js:681:13)
    at Promise$_settlePromiseFromHandler [as _settlePromiseFromHandler] (/usr/local/lib/node_modules/github-changes/node_modules/bluebird/js/main/promise.js:697:18)
    at Promise$_settlePromiseAt [as _settlePromiseAt] (/usr/local/lib/node_modules/github-changes/node_modules/bluebird/js/main/promise.js:879:14)
    at Promise$_fulfillPromises [as _fulfillPromises] (/usr/local/lib/node_modules/github-changes/node_modules/bluebird/js/main/promise.js:981:14)

I’m wondering it’s possible to not rely on internet to make it happen, given I have the repo locally.

Thanks.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
TheJavaGuycommented, Dec 30, 2020

I tried to reproduce this and here are my findings - this error happens if one of the tags given as a value of --between-tags option doesn’t exist in the repo! This happens regardless of being online or offline (of course, when being online there’s no waiting i.e. it doesn’t take ages).

@lalitkapoor Some ideas for improving the situation here: if --between-tags is given, first check if both tags really exist. If one (or both) doesn’t exist, print error message that says which tag doesn’t exist. Also, if both tags exist maybe it’s possible not to fetch all commits in the repo, but just commits between these 2 tags. This should save some time and bandwidth.

In the version 2.0.1, stack trace looks like this:

stack TypeError: Cannot read property 'date' of null
    at C:\Programs\node-v10.19.0-win-x64\node_modules\github-changes\bin\index.js:273:61
    at Array.forEach (<anonymous>)
    at commitFormatter (C:\Programs\node-v10.19.0-win-x64\node_modules\github-changes\bin\index.js:272:8)
    at formatter (C:\Programs\node-v10.19.0-win-x64\node_modules\github-changes\bin\index.js:378:39)
    at C:\Programs\node-v10.19.0-win-x64\node_modules\github-changes\bin\index.js:448:35
    at bound (domain.js:402:14)
    at runBound (domain.js:415:12)
    at tryCatcher (C:\Programs\node-v10.19.0-win-x64\node_modules\github-changes\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (C:\Programs\node-v10.19.0-win-x64\node_modules\github-changes\node_modules\bluebird\js\release\promise.js:547:31)
    at Promise._settlePromise (C:\Programs\node-v10.19.0-win-x64\node_modules\github-changes\node_modules\bluebird\js\release\promise.js:604:18)
    at Promise._settlePromise0 (C:\Programs\node-v10.19.0-win-x64\node_modules\github-changes\node_modules\bluebird\js\release\promise.js:649:10)
    at Promise._settlePromises (C:\Programs\node-v10.19.0-win-x64\node_modules\github-changes\node_modules\bluebird\js\release\promise.js:729:18)
    at Promise._fulfill (C:\Programs\node-v10.19.0-win-x64\node_modules\github-changes\node_modules\bluebird\js\release\promise.js:673:18)
    at Promise._resolveCallback (C:\Programs\node-v10.19.0-win-x64\node_modules\github-changes\node_modules\bluebird\js\release\promise.js:466:57)
    at Promise._settlePromiseFromHandler (C:\Programs\node-v10.19.0-win-x64\node_modules\github-changes\node_modules\bluebird\js\release\promise.js:559:17)
    at Promise._settlePromise (C:\Programs\node-v10.19.0-win-x64\node_modules\github-changes\node_modules\bluebird\js\release\promise.js:604:18)
0reactions
lalitkapoorcommented, Jan 15, 2021

Offline support isn’t something I’m interested in adding, you may want to consider a tool like https://github.com/git-chglog/git-chglog. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Member Support - Offline
Welcome to Offline! Wondering about the most common new member questions? How do I use my Offer? How do I set/change my Offer...
Read more >
Progressive Web Apps: Going Offline - Google Developers
1. Welcome. In this lab, you'll take an existing web application and make it work offline. This is the first in a series...
Read more >
Enabling offline support - Pega Academy
Enabling offline support for users by configuring the appropriate access groups; Enabling the appropriate case types for offline processing.
Read more >
Mobile Apps Offline Support - InfoQ
Offline support for mobile applications can be thought of as the ability for the application to react gracefully to the lack of stability...
Read more >
Offline Support - Yjs Docs
Offline Support. Adding offline support with y-indexeddb. We covered that network providers sync document updates over a network protocol to other peers.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found