-
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 Resource: Derive API URL from PR URL #1817
Conversation
- [Overriding where resources are copied from](#overriding-where-resources-are-copied-from) | ||
- [Resource Status](#resource-status) | ||
- [Optional Resources](#optional-resources) | ||
- [Variable substitution](#variable-substitution) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatting nit: this is the first time i've seen the three-spaces-for-bullets formatting. looks like it's only for this doc? Might be a formatting error. Suggest changing all bullets to single space ala -
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're already using it inconsistently throughout this file already (the - [Syntax](#syntax)
parent uses the 3 space bullet).
(though it's entirely possible that my autoformatter is responsible for all of these 😅)
I added an AI to the productivity WG to define a standard formatter for us to recommend everyone. Until then, ¯_(ツ)_/¯
minor nits. otherwise lgtm. /lgtm |
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
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbwsg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
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:
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
/cc @a-roberts
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Release Notes