About API code comments and some behavior.

Mads Kiilerich mads at kiilerich.com
Fri Oct 14 12:51:16 UTC 2022


Hi

Thank you. (If you are working from a repo checkout, it would be more 
helpful if you could send a diff.) I haven't verified in detail, but all 
the changes seem plausible ;-) I have pushed them to the stable branch.

One question though:

>            id : <id_given_in_input>
>            result : {
>              "msg": "created new gist",
> -            "gist": {}
> +            "gist": <gist_object>
>            }
>            error :  null

What is gist object? That should perhaps be clarified. Or perhaps it is 
a bug that it is returned ...

> - The 'parent' parameter of 'update_repo_group' does not work.
>   It appears to accept the 'parent' parameter, but specifying it seems 
> to have no effect. 

A quick look:  The update_repo_group API arguments seems to be handled 
by 
https://kallithea-scm.org/repos/kallithea/files/7037365a/kallithea/model/repo_group.py#L278 
. So perhaps the code in api.py should pass it as 'parent_group_id' 
instead of 'parent_group'?
(But also, 'owner' doesn't seem to be handled at all. Does owner change 
really work for you? But also, I don't think it matters much who owns a 
repo group. Admin rights does the same thing. So repo group owner should 
perhaps just be removed from api.py and documentation?)

Anyway:
I also pushed some further cleanup of the documentation in api.py and 
api.rst .That's on the *stable* branch. It would be great if they could 
converge, and we could generate api.rst from api.py .
If you want to improve documentation further, take a look at 
https://kallithea-scm.org/repos/kallithea/pull-request/325/_/api and 
propose api.py changes to make a grand unification.

/Mads


On 13/10/2022 15:00, toras wrote:
> Hi.
>
>
> There was an API-related topic a little while ago,so there may be 
> things that are currently being changed, but I recently noticed 
> something while writing a client that uses the API, so I'd like to 
> report it.
>
> - The comments in api.py have some differences from the implementation.
>   I tried calling the API and attached a file that changed the part 
> that is different from the result.
>   (Based on commit 7037365a7bc3.)
>   I don't know if this is necessary, but for your information.
>
> - The 'parent' parameter of 'update_repo_group' does not work.
>   It appears to accept the 'parent' parameter, but specifying it seems 
> to have no effect.
>
>
> Thanks
>
> -- 
> toras9000
>
>
> _______________________________________________
> kallithea-general mailing list
> kallithea-general at sfconservancy.org
> https://lists.sfconservancy.org/mailman/listinfo/kallithea-general




More information about the kallithea-general mailing list