EdgeTX / buddy

The next generation tool for EdgeTX. A cross platform app, with browser compatibility.
https://buddy.edgetx.org
MIT License
39 stars 19 forks source link

fix: prevent crash when fetching a PR with over 30 commits #39

Closed bigspeedfpv closed 1 year ago

bigspeedfpv commented 1 year ago

Addresses #38.

Github's PR commits endpoint seems to return commits from oldest to newest, which previously caused Buddy to crash when fetching a PR with over 30 commits. This PR increases the commit limit when fetching PRs and ensures that the head commit is included in the list of commits returned by the API.

Github's REST API does not allow for sorting of commits on a PR. This PR fixes crashes because of this, but does NOT fix the latest commit being unavailable if the limit is reached. This probably won't be an issue (I haven't found any PRs even close to 100 commits in EdgeTX).

codecov-commenter commented 1 year ago

Codecov Report

Merging #39 (72afcc3) into main (e604c2f) will decrease coverage by 0.00%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main      #39      +/-   ##
==========================================
- Coverage   52.63%   52.63%   -0.01%     
==========================================
  Files          80       80              
  Lines        7812     7813       +1     
  Branches      630      630              
==========================================
  Hits         4112     4112              
- Misses       3691     3692       +1     
  Partials        9        9              
Impacted Files Coverage Δ
src/shared/backend/graph/firmware/index.ts 57.02% <0.00%> (-0.17%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

freshollie commented 1 year ago

Thanks for this, e2e tests are being weird I'll take a look