diff --git a/eventing/README.md b/eventing/README.md index a41db69ce..dca408610 100644 --- a/eventing/README.md +++ b/eventing/README.md @@ -177,6 +177,7 @@ The GitHubSource fires a new event for selected - `sink`: [ObjectReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#objectreference-v1-core) A reference to the object that should receive events. +- `githubAPIURL`: `string` Optional field to specify the base URL for API requests. Defaults to the public GitHub API if not specified, but can be set to a domain endpoint to use with GitHub Enterprise, for example, `https://github.mycompany.com/api/v3/`. This base URL should always be specified with a trailing slash. See the [GitHub Source](samples/github-source) example. diff --git a/eventing/samples/github-source/README.md b/eventing/samples/github-source/README.md index 200bd6f0c..5817d7db0 100644 --- a/eventing/samples/github-source/README.md +++ b/eventing/samples/github-source/README.md @@ -100,6 +100,10 @@ Source for a specific namespace. Be sure to replace the `ownerAndRepository` value with a valid GitHub public repository owned by your GitHub user. +If using GitHub enterprise you will need to add an additional githubAPIURL +field to the spec specifying your GitHub enterprise API endpoint, see +[here](../../README.md#githubsource) + ```yaml apiVersion: sources.eventing.knative.dev/v1alpha1 kind: GitHubSource diff --git a/eventing/samples/github-source/github-source.yaml b/eventing/samples/github-source/github-source.yaml index e649d80d0..6cabd391a 100644 --- a/eventing/samples/github-source/github-source.yaml +++ b/eventing/samples/github-source/github-source.yaml @@ -18,3 +18,5 @@ spec: apiVersion: serving.knative.dev/v1alpha1 kind: Service name: github-message-dumper +# To use GitHub Enterprise you would need to add an entry for your githubAPIURL similar to the example below +# githubAPIURL: "https://github.mycompany.com/api/v3/"