Skip to content

Support GitLab for PR Builder #6052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
saadmk11 opened this issue Aug 8, 2019 · 5 comments
Closed
3 tasks done

Support GitLab for PR Builder #6052

saadmk11 opened this issue Aug 8, 2019 · 5 comments
Labels
Needed: design decision A core team decision is required

Comments

@saadmk11
Copy link
Member

saadmk11 commented Aug 8, 2019

Details

As we have initially added support for GitHub, we need to start thinking about supporting other providers such as GitLab.

Initial building blocks were created for the PR Builder. Next Steps for supporting GitLab might be:

def get_webhook_data(self, repo_id, project, integration):
"""
Get webhook JSON data to post to the API.
See: http://doc.gitlab.com/ce/api/projects.html#add-project-hook
"""
return json.dumps({
'id': repo_id,
'push_events': True,
'tag_push_events': True,
'url': 'https://{domain}{path}'.format(
domain=settings.PRODUCTION_DOMAIN,
path=reverse(
'api_webhook',
kwargs={
'project_slug': project.slug,
'integration_pk': integration.pk,
},
),
),
'token': integration.secret,
# Optional
'issues_events': False,
'merge_requests_events': False,
'note_events': False,
'job_events': False,
'pipeline_events': False,
'wiki_events': False,
})

Referencing this issue as it talks about supporting GitLab for PR Builder: #2464

@stsewd
Copy link
Member

stsewd commented Aug 8, 2019

We have to add this for future webhook creation and also figure out a way to add this to previously created webhooks for GitLab.

There are some ideas around that here #5062 (it's about github, but the same applies)

@saadmk11
Copy link
Member Author

saadmk11 commented Aug 8, 2019

@stsewd I suppose we could do a automatic re-sync for GitLab through a Management Command.
Or maybe we can show a site notification to the users who have a GitLab project with PR Builder enabled that they need to re-sync their GitLab webhook to get the PR Builder Working.

@saadmk11 saadmk11 added the Needed: design decision A core team decision is required label Aug 8, 2019
@ericholscher
Copy link
Member

This sounds good. I think to start we can just start setting the merge_requests on new gitlab connections. We can then worry later about how to reconnect them, after we have the rest of the code working I think.

@saadmk11
Copy link
Member Author

saadmk11 commented Aug 8, 2019

Yeah I was thinking the same :)

@saadmk11
Copy link
Member Author

Closing this as all the work for this issue has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: design decision A core team decision is required
Projects
None yet
Development

No branches or pull requests

3 participants