On 09/18/2018 05:52 PM, Robert Munteanu wrote:
On Thu, 2018-09-13 at 16:45 +0200, Daniel Gruno wrote:
On 09/13/2018 04:42 PM, Daniel Gruno wrote:
On 09/13/2018 04:38 PM, Robert Munteanu wrote:
Hi,

I am trying to simplify my job of keeping the list of sources up-
to-
date for the Kibble demo instance. Basically we add git
repositories
periodically and I want to add them to Kibble as well.

I was thinking of using the Kibble API to retrieve the list of
sources
and checking which of our repositories are not there, so I can
easily
paste them in Kibble.

It's a bit convoluted at the moment, apologies.
First, you have to obtain a session cookie by logging in;
https://demo.kibble.apache.org/apidoc.html#put-api-session
when you have that cookie, pass it to the API end point you wish to
use,
and it should work just fine.

I'll be working later next week on API tokens for use here, it's
one of
the things that are still missing.

With regards,
Daniel.


I should add one important/easy thing here:

If you want to keep the list of sources up to date with e.g. github,
you
can just PUT a request with all the sources you have, and it will
both
update existing ones and add the ones it doesn't have, there are
checks
against adding duplicates, so only sources that aren't in the DB
would
get added even if you post old sources to the API.


That is nice! Since I'm having some issues with the API (see earlier
emails) I used the web form to paste in all Sling repos again. It seems
to have worked - the repos are added (though I see not yet processed )
and the old date is still there.

I'll look into the API issue - I think it might be an issue with the session maker, which MAY need a cookie before you PUT to session...which obviously shouldn't be a thing :D maybe I should just look into proper API tokens instead.


One things which threw me off a bit is that even existing repositories
now have a status of "Source hasn't been processed yet..." . That looks
mostly cosmetic though since the old data is still there.

I think some of it is a remnant of me copying over a bunch of it directly from the old database, not through the API.

One thing to note; For GitHub repos, you will need to specify a user/pass if you want github issues/PRs to be looked at - this can be an anonymous account if you like. I'll see if I can't work our regular kibble user into the repos you added, assuming you did not specify any user.


Thanks,

Robert


Reply via email to