-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
migrate the pullrequest-init code to go-scm to handle multiple git providers? #1066
Comments
Thanks for raising this! I'm not against sharing the common type here, but we'll probably need to make some changes to support everything we want. The biggest concern I see is the lack of a common status enum, since it means pipelines will need to know the implementation specific statuses. For example:
@jstrachan few questions:
|
Looks like we also need support for labels in go-scm. |
Any update here? Happy to contribute where needed. Would really love to use Tekton to manage Bitbucket PRs. Is the next step adding BB PR labels to the jenkins-x go-scm fork? |
@kav Yes! That would be very helpful. jenkins-x/go-scm#21 |
I'll be starting work to replatform the PullRequest resource on go-scm soon. I'm sure a bunch of missing bits will shake out as a result 🙃 |
I really like the approach by Concourse CI to make "Resources" a container which handles 'get', 'put' and 'check' requests. It renders resources very modular, as anybody can write up a new image and use it as a resource. Was there any consideration using a similar approach with TektonCD Resources? It would allow the community to create "resource containers" themselves and prevent in-tree implementations to support all the varieties (e.g. "I want Gitea support!" -> " Write your own resource container"). |
This changes the underlying implementation of the PullRequestResource to jenkins-x/go-scm in order to take advantage of the repo drivers to support other SCM providers. In the process, this also allowed for refactoring to have a cleaner distinction between interaction with SCM APIs and converting the data to an on disk format. BREAKING CHANGES: * go-scm does not yet support updating comments, so that behavior is removed for the time being since: 1) it's unclear if anyone is actively using it. 2) this behavior can be roughly replicated with a delete + create. 3) the benefits of having the other SCM providers outweighs this feature. Fixes tektoncd#1066.
This changes the underlying implementation of the PullRequestResource to jenkins-x/go-scm in order to take advantage of the repo drivers to support other SCM providers. In the process, this also allowed for refactoring to have a cleaner distinction between interaction with SCM APIs and converting the data to an on disk format. BREAKING CHANGES: * go-scm does not yet support updating comments, so that behavior is removed for the time being since: 1) it's unclear if anyone is actively using it. 2) this behavior can be roughly replicated with a delete + create. 3) the benefits of having the other SCM providers outweighs this feature. Fixes tektoncd#1066.
This changes the underlying implementation of the PullRequestResource to jenkins-x/go-scm in order to take advantage of the repo drivers to support other SCM providers. In the process, this also allowed for refactoring to have a cleaner distinction between interaction with SCM APIs and converting the data to an on disk format. BREAKING CHANGES: * go-scm does not yet support updating comments, so that behavior is removed for the time being since: 1) it's unclear if anyone is actively using it. 2) this behavior can be roughly replicated with a delete + create. 3) the benefits of having the other SCM providers outweighs this feature. Fixes tektoncd#1066.
This changes the underlying implementation of the PullRequestResource to jenkins-x/go-scm in order to take advantage of the repo drivers to support other SCM providers. In the process, this also allowed for refactoring to have a cleaner distinction between interaction with SCM APIs and converting the data to an on disk format. BREAKING CHANGES: * go-scm does not yet support updating comments, so that behavior is removed for the time being since: 1) it's unclear if anyone is actively using it. 2) this behavior can be roughly replicated with a delete + create. 3) the benefits of having the other SCM providers outweighs this feature. Fixes tektoncd#1066.
This changes the underlying implementation of the PullRequestResource to jenkins-x/go-scm in order to take advantage of the repo drivers to support other SCM providers. In the process, this also allowed for refactoring to have a cleaner distinction between interaction with SCM APIs and converting the data to an on disk format. BREAKING CHANGES: * go-scm does not yet support updating comments, so that behavior is removed for the time being since: 1) it's unclear if anyone is actively using it. 2) this behavior can be roughly replicated with a delete + create. 3) the benefits of having the other SCM providers outweighs this feature. Fixes tektoncd#1066.
This changes the underlying implementation of the PullRequestResource to jenkins-x/go-scm in order to take advantage of the repo drivers to support other SCM providers. In the process, this also allowed for refactoring to have a cleaner distinction between interaction with SCM APIs and converting the data to an on disk format. BREAKING CHANGES: * go-scm does not yet support updating comments, so that behavior is removed for the time being since: 1) it's unclear if anyone is actively using it. 2) this behavior can be roughly replicated with a delete + create. 3) the benefits of having the other SCM providers outweighs this feature. Fixes tektoncd#1066.
This changes the underlying implementation of the PullRequestResource to jenkins-x/go-scm in order to take advantage of the repo drivers to support other SCM providers. In the process, this also allowed for refactoring to have a cleaner distinction between interaction with SCM APIs and converting the data to an on disk format. BREAKING CHANGES: * go-scm does not yet support updating comments, so that behavior is removed for the time being since: 1) it's unclear if anyone is actively using it. 2) this behavior can be roughly replicated with a delete + create. 3) the benefits of having the other SCM providers outweighs this feature. Fixes tektoncd#1066.
This changes the underlying implementation of the PullRequestResource to jenkins-x/go-scm in order to take advantage of the repo drivers to support other SCM providers. In the process, this also allowed for refactoring to have a cleaner distinction between interaction with SCM APIs and converting the data to an on disk format. BREAKING CHANGES: * go-scm does not yet support updating comments, so that behavior is removed for the time being since: 1) it's unclear if anyone is actively using it. 2) this behavior can be roughly replicated with a delete + create. 3) the benefits of having the other SCM providers outweighs this feature. Fixes #1066.
It would be great to migrate the
pullrequest-init
code to support any git provider (bitbucket, gitlab, gitea et al). e.g. for #1000We've been using this fork of
go-scm
to handle multiple git providers via a single unified API: https://github.com/jenkins-x/go-scm and its been working great.e.g. we've ported the main prow ChatOps commands into a new webhook handle using it: https://github.com/jenkins-x/lighthouse/ and its working great for many git providers.
Its a small simple library with modest dependencies so is a drop in replacement for the https://github.com/google/go-github library which would then solve the multi-git provider support issue.
The generated JSON is close to the current JSON (a few minor changes though) but at least uses the same JSON schema whatever git provider is used.
e.g. here's some examples
To create the
scm.Client
we just need 3 strings; the driver name, optional server URL and oauth token...How do folks think about migrating to this go-scm library?
The text was updated successfully, but these errors were encountered: