wemakecustom / gitlab-composer

Gitlab Composer repository
163 stars 44 forks source link

Allow update from gitlab web hook #32

Open jxn opened 6 years ago

jxn commented 6 years ago

It'd be really nice to allow requests coming from gitlab webhooks update projects, or better yet just that one project associated with the webhook, so we don't have to wait for cron.

It looks very easy to trigger update from webhook, but given the architecture, it looks a bit challenging to only update a given repository without checking all others. Any interest in this? It'd require a pretty decent refactor.

lemoinem commented 6 years ago

That's a great idea!

I, unfortunately, don't have the time to work on it. However, I would be more than open to review and discuss any PR you could submit.

I think updating the packages piece-wise might be easier than you think (in particular, have a look at $load_data and $fetch_ref. However, the main part of packages.php would need to be refactored so to accomodate this, indeed.

If I may, I think it would be best to have the option (but not be forced to) rely on the webhooks. For example via a configuration or something.

keywan-ghadami-oxid commented 6 years ago

@jxn I am working on webhook implementation any help or feed back is welcome https://github.com/keywan-ghadami-oxid/gitlab-composer/pull/2

keywan-ghadami-oxid commented 6 years ago

Here we go https://github.com/wemakecustom/gitlab-composer/pull/36