tmcgilchrist / ocaml-gitlab

Native OCaml bindings to Gitlab REST API v4
https://tmcgilchrist.github.io/ocaml-gitlab/gitlab/
BSD 3-Clause "New" or "Revised" License
27 stars 8 forks source link

RFC/WIP: various more tweaks #68

Closed arvidj closed 2 years ago

arvidj commented 2 years ago

Some various tweaks. Sorry for submitting such "batch MRs" but i tend to add tweaks here and there when using the lib to write scripts. Then I submit the batch of tweaks when I get a chance.

I think most changes here are obvious but some commentary:

i'm not sure this is the correct way to do things

indeed, the estimates can be something like "4 days" or so. here's an example:

$ curl -s 'https://gitlab.com/api/v4/projects/tezos%2Ftezos/merge_requests/5876' | jq '.time_stats.human_time_estimate'
"112h"

looking in gitlab.atd i see other suspicious entries:

11 matches for "human_" in buffer: gitlab.atd
    300:  human_time_estimate: string nullable;
    301:  human_total_time_spent: string nullable;
    601:  human_total_time_spent: int nullable;
    602:  human_time_change: int nullable;
    603:  human_time_estimate: int nullable;
    672:  human_total_time_spent: int nullable;
    673:  human_time_change: int nullable;
    674:  human_time_estimate: int nullable;
    772:  human_time_change:string nullable;
    773:  human_time_estimate:string nullable;
    774:  human_total_time_spent:string nullable;

but I'm not sure there . i'll happily change them all to string nullable if you think it is correct :)


didn't forget to update CHANGES.md this time -- i noticed that a section for 0.1.5 had not been created yet so I did so :)

arvidj commented 2 years ago

Thanks for the merge!