GitHub Webhook feature request

Bug #2017588 reported by surfzoid
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

Hi
Here it is a summary of our ICQ discussion with jugmac00.
Launchpad need to generate a webhook request URL, by following Fedora COPR template https://copr.fedorainfracloud.org/coprs/surfzoid/HikNetExtractor/builds/.
On github side, the default signal is push, we can customise it to send "release", "tag" and plenty other event.
Go to https://github.com create an account and a project/repo, go project setting->webhook.
On Launchpad side, generate URL with token, catch github signal with event, update /synchronize the repo and automatically start the build of deb packages.

Guruprasad (lgp171188)
Changed in launchpad:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Ines Almeida (ines-almeida) wrote :

Hi!

Just to clarify: you would like for launchpad to have some sort of endpoint that would synchronize your repo and start a build, so that you could then hook it up with GitHub's webhooks to trigger it on github events (using a token as authentication). Is this correct? If not, can you be more specific on what it is you need to happen?

Regarding the repo synchronization to launchpad, that can already be setup to be regularly updated (have a look at https://help.launchpad.net/Code/Git#Mirroring_repositories_from_other_sites). Would that mitigate your issue at all?

Revision history for this message
surfzoid (surfzoid) wrote :

Hi
- again Fedora Copr is the perfect example.
- somewhere, yes.
- to clarify.
1 i commit my code to github.
2 my github workflow build my program, then create a release and tag/version.
3 github web-hook send notification to launchpad, it can be new release, my case, but also any other event, like push, commit, and so on.
4 launchpad receive the github web-hook event and pull the github code.
5 launchpad start the build of the packages/deb.

Revision history for this message
surfzoid (surfzoid) wrote :
Revision history for this message
surfzoid (surfzoid) wrote :

It isn't the good place, but, i don't need to receive a mail when i write a comment here, i know what i writes .......

Revision history for this message
Colin Watson (cjwatson) wrote :

At present Launchpad doesn't support incoming webhooks, but (as Inês said) it _does_ support code imports, which can be used to make a git repository on Launchpad that mirrors a repository hosted somewhere else. You can use that to do what you're asking for; the only downside is that code imports are updated a few times a day rather than immediately.

(As a bonus, you can use code imports in situations where you can't use webhooks, for example if you don't have permission to install a webhook on the remote repository.)

Revision history for this message
surfzoid (surfzoid) wrote :

This is not good, i don't want to rebuild for minor commit, only for new release.
As a bonus, this will increase perf to build only need rather each time.

After imported my GH's repo i din't find "mirrors a repository" option.

Revision history for this message
Colin Watson (cjwatson) wrote :

OK. In that case I should set expectations: this would be a fairly large project for us to add, and it is not on our roadmap for the next six months (which has already been agreed). So if you want anything like this soon, you'll need to look into workarounds using Launchpad's existing APIs.

Revision history for this message
surfzoid (surfzoid) wrote :

Hi
I search workaround to make launchpad more friendly with GH.
My biggest issue is, i work with QtCreator and VS code, both have git hub management.
after a commit i can push from both, but i need to open a console and again push for lauchpad, is there an "all in one" way?

Revision history for this message
Colin Watson (cjwatson) wrote :

The all-in-one way is code imports, as I mentioned before - but you've said you don't want to use those.

Revision history for this message
surfzoid (surfzoid) wrote :

yes i prefer a build only when new release.
any way #github help me to configure 2 push URL i will use the dirty way and wait the clean solution of web hook.

I will be happy to be notified.

Thank's for your work.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.