dantleech / what-changed

Generate change reports when you update composer
MIT License
118 stars 2 forks source link

Unhandled GitHub response #19

Open cj-clx opened 4 years ago

cj-clx commented 4 years ago

Received this output today when running a minor, white-listed composer update:

dantleech/what-changed: nothing changed
dantleech/what-changed: 1 updated

  cxj/validate.address f69bae05..80511b70
dantleech/whatchanged: ERROR: Unexpected response from Github: "{
    "message": "Not Found",
    "documentation_url": "https:\/\/developer.github.com\/v3\/repos\/commits\/#compare-two-commits"
}"

Not sure how to interpret it. Is this something I did wrong? And/or is it something what-changed could better handle?

Running git log f69bae05..80511b70 on the cxj/validate.address repository works fine and outputs the expected log messages. git diff f69bae05..80511b70 similarly works as expected.

Could this be just a transient error from GitHub's API?

dantleech commented 4 years ago

Possibly -- does it work if you revert the composer lock to the previous state and run it again?

cj-clx commented 4 years ago

I reverted composer.lock and re-ran my composer update command. Got the same error. So it is reproducible for some set of circumstances. I've not had any other problems with what-changed other than this instance.

dantleech commented 4 years ago

Strange, no rebasing, squahsing etc that might explain it, somehow? I guess it works going forward?

cj-clx commented 4 years ago

Nope. It's a pretty plain vanilla chain of commits to master with the occasional minor dev branch merge. I'll follow up where the next time I do an update with whatever the results are.

cj-clx commented 4 years ago

Oddly just ran into this problem again:

dantleech/what-changed: nothing changed
dantleech/what-changed: 10 updated

  aura/di ea4b166e..fefda6b3
dantleech/whatchanged: ERROR: Unexpected response from Github: "{
    "message": "Not Found",
    "documentation_url": "https:\/\/docs.github.com\/rest\/reference\/repos#compare-two-commits"
}"

I was running composer install in this case. Looks like from my previous comments, it was during an update last time.

dantleech commented 4 years ago

Similar issue with #21 - one quick win would be to simply tolerate these errors.