danger / swift

⚠️ Stop saying "you forgot to …" in code review
https://danger.systems/swift/
MIT License
1.04k stars 135 forks source link

Gitlab Error in merge request with estimate or spent time #548

Closed oscarcv closed 1 year ago

oscarcv commented 1 year ago

The humanTimeEstimate and humanTimeSpent fields are parsed as Int and the api returns them as String.

An example of this format would be 1mo 2w 3d 4h 5m (Gitlab - Time Tracker Units)

An example from the official gitlab documentation:

{
  "human_time_estimate": "3h 30m",
  "human_total_time_spent": null,
  "time_estimate": 12600,
  "total_time_spent": 0
}

Thank you

oscarcv commented 1 year ago

Good catch! Can you please also update the changelog? As an addition having a unit test for this would be great, but I'm fine also without it

@f-meloni

I have modified the tests to validate the type change and check the parse and I have also added the entry in the Changelog.

Thanks

417-72KI commented 1 year ago

@oscarcv Can you please merge or rebase origin? 🙇 An linux runner on GitHub Actions has been updated and caused CI failure, resolved on #550.

oscarcv commented 1 year ago

@oscarcv Can you please merge or rebase origin? 🙇 An linux runner on GitHub Actions has been updated and caused CI failure, resolved on #550.

@417-72KI Merged from origin