-
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
PullRequest SCM Resource does not work with Custom URLs #1816
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
Comments
/kind feature |
tekton-robot
added
the
kind/feature
Categorizes issue or PR as related to a new feature.
label
Jan 7, 2020
wlynch
added a commit
to wlynch/pipeline
that referenced
this issue
Jan 7, 2020
Currently, we always use the default API URL for all requests, which means that the PR resource cannot be used with GitHub Enterprise or self hosted GitLab instances. This changes the behavior to build the API Base URL from the PR resource if the URL is not the default: PR URL | API Base URL -------|------------- https://github.com | https://api.github.com https://github.example.com | https://github.example.com/v3/api https://gitlab.com | https://gitlab.com https://gitlab.example.com | https://gitlab.example.com GitHub Documentation: https://developer.github.com/v3/#schema GitHub Enterprise Documentation: https://developer.github.com/enterprise/2.17/v3/#schema GitLab Documentation: https://developer.github.com/enterprise/2.17/v3/#current-version Fixes tektoncd#1816
wlynch
added a commit
to wlynch/pipeline
that referenced
this issue
Jan 7, 2020
Currently, we always use the default API URL for all requests, which means that the PR resource cannot be used with GitHub Enterprise or self hosted GitLab instances. This changes the behavior to build the API Base URL from the PR resource if the URL is not the default: PR URL | API Base URL ---------------------------|------------- https://github.com | https://api.github.com https://github.example.com | https://github.example.com/v3/api https://gitlab.com | https://gitlab.com https://gitlab.example.com | https://gitlab.example.com GitHub Documentation: https://developer.github.com/v3/#schema GitHub Enterprise Documentation: https://developer.github.com/enterprise/2.17/v3/#schema GitLab Documentation: https://developer.github.com/enterprise/2.17/v3/#current-version Fixes tektoncd#1816
wlynch
added a commit
to wlynch/pipeline
that referenced
this issue
Jan 7, 2020
Currently, we always use the default API URL for all requests, which means that the PR resource cannot be used with GitHub Enterprise or self hosted GitLab instances. This changes the behavior to build the API Base URL from the PR resource if the URL is not the default: PR URL | API Base URL ---------------------------|------------- https://github.com | https://api.github.com https://github.example.com | https://github.example.com/v3/api https://gitlab.com | https://gitlab.com https://gitlab.example.com | https://gitlab.example.com GitHub Documentation: https://developer.github.com/v3/#schema GitHub Enterprise Documentation: https://developer.github.com/enterprise/2.17/v3/#schema GitLab Documentation: https://developer.github.com/enterprise/2.17/v3/#current-version Fixes tektoncd#1816
3 tasks
wlynch
added a commit
to wlynch/pipeline
that referenced
this issue
Jan 7, 2020
Currently, we always use the default API URL for all requests, which means that the PR resource cannot be used with GitHub Enterprise or self hosted GitLab instances. This changes the behavior to build the API Base URL from the PR resource if the URL is not the default: PR URL | API Base URL ---------------------------|------------- https://github.com | https://api.github.com https://github.example.com | https://github.example.com/v3/api https://gitlab.com | https://gitlab.com https://gitlab.example.com | https://gitlab.example.com GitHub Documentation: https://developer.github.com/v3/#schema GitHub Enterprise Documentation: https://developer.github.com/enterprise/2.17/v3/#schema GitLab Documentation: https://developer.github.com/enterprise/2.17/v3/#current-version Fixes tektoncd#1816
tekton-robot
pushed a commit
that referenced
this issue
Jan 7, 2020
Currently, we always use the default API URL for all requests, which means that the PR resource cannot be used with GitHub Enterprise or self hosted GitLab instances. This changes the behavior to build the API Base URL from the PR resource if the URL is not the default: PR URL | API Base URL ---------------------------|------------- https://github.com | https://api.github.com https://github.example.com | https://github.example.com/v3/api https://gitlab.com | https://gitlab.com https://gitlab.example.com | https://gitlab.example.com GitHub Documentation: https://developer.github.com/v3/#schema GitHub Enterprise Documentation: https://developer.github.com/enterprise/2.17/v3/#schema GitLab Documentation: https://developer.github.com/enterprise/2.17/v3/#current-version Fixes #1816
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior
Be able to use the Pull Request resource for custom URLs (e.g. GitHub Enterprise, self hosted GitLab).
Actual Behavior
PullRequest resources uses default client for GitHub/GitLab, defaulting to the public hosts (e.g. api.github.com).
Additional Info
We should move away from the use of
NewDefault()
and useNew(url)
instead.See tektoncd/experimental#419 for the original report.
/cc @a-roberts
/assign @wlynch
The text was updated successfully, but these errors were encountered: