Repository: knative/client
Pull request #1254 (2021-03-09 08:28:01)

Drop master references to knative repos
## Description

As per title, dropping all the refs to master that are now renamed to main. Also fixed a small occurrence in a test that seemed wrong anyway.

/assign @rhuss 

knative-prow-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by:
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **markusthoemmes** after the PR has been reviewed.
You can assign the PR to them by writing `/assign @markusthoemmes` in a comment when ready.

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=knative%2Fclient).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/knative/client/blob/main/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["markusthoemmes"]} -->
knative-prow-robot: @markusthoemmes: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-integration-tests | 6c7e0bbb8248b1484d1720c387f023d106b9deae | [link](https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative_client/1254/pull-knative-client-integration-tests/1369203328466030592) | `/test pull-knative-client-integration-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/1254). [Your PR dashboard](https://gubernator.knative.dev/pr/markusthoemmes).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
rhuss: /retest
knative-prow-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/knative/client/pull/1254#pullrequestreview-607180607" title="Approved">rhuss</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=knative%2Fclient).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/knative/client/blob/main/OWNERS)~~ [rhuss]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
knative-prow-robot: @markusthoemmes: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-knative-client-integration-tests | 6c7e0bbb8248b1484d1720c387f023d106b9deae | [link](https://prow.knative.dev/view/gs/knative-prow/pr-logs/pull/knative_client/1254/pull-knative-client-integration-tests/1369216230417764352) | `/test pull-knative-client-integration-tests`

[Full PR test history](https://gubernator.knative.dev/pr/knative_client/1254). [Your PR dashboard](https://gubernator.knative.dev/pr/markusthoemmes).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->

Patch:
diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc
index 8f7dfd23..4a988894 100644
--- a/CHANGELOG.adoc
+++ b/CHANGELOG.adoc
@@ -25,6 +25,9 @@
 | Fix kn export to always honor mode irrespective of revisions flag and have Export as the default mode
 | https://github.com/knative/client/pull/1212[#1212]
 
+| 🎁
+| Add S column to specify built-in sources in kn source list-types
+| https://github.com/knative/client/pull/1246[#1246]
 |===
 
 ## v0.21.0 (2021-02-23)
@@ -556,7 +559,7 @@
 | https://github.com/knative/client/pull/834[#834]
 
 | 🐣
-| Update and expanded https://github.com/knative/client/blob/master/conventions/cli.md[CLI convention document]
+| Update and expanded https://github.com/knative/client/blob/main/conventions/cli.md[CLI convention document]
 | https://github.com/knative/client/pull/831[#831]
 
 | 🐛
diff --git a/OWNERS b/OWNERS
index 5dd10177..58bc5f70 100644
--- a/OWNERS
+++ b/OWNERS
@@ -1,7 +1,7 @@
 approvers:
 - maximilien
+- dsimansk
 - client-wg-leads
 - toc
 reviewers:
 - itsmurugappan
-- dsimansk
diff --git a/README.md b/README.md
index a1adb82b..e908c383 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
 [![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white)](https://pkg.go.dev/knative.dev/client)
 [![Go Report Card](https://goreportcard.com/badge/knative/client)](https://goreportcard.com/report/knative/client)
 [![Releases](https://img.shields.io/github/release-pre/knative/client.svg)](https://github.com/knative/client/releases)
-[![LICENSE](https://img.shields.io/github/license/knative/client.svg)](https://github.com/knative/client/blob/master/LICENSE)
+[![LICENSE](https://img.shields.io/github/license/knative/client.svg)](https://github.com/knative/client/blob/main/LICENSE)
 [![Slack Status](https://img.shields.io/badge/slack-join_chat-white.svg?logo=slack&style=social)](https://knative.slack.com)
 
 The Knative client `kn` is your door to the [Knative](https://knative.dev)
@@ -25,9 +25,9 @@ line or from within scripts.
 
 
 This client uses the
-[Knative Serving](https://github.com/knative/docs/blob/master/docs/serving/spec/knative-api-specification-1.0.md)
+[Knative Serving](https://github.com/knative/docs/blob/main/docs/serving/spec/knative-api-specification-1.0.md)
 and
-[Knative Eventing](https://github.com/knative/eventing/tree/master/docs/spec)
+[Knative Eventing](https://github.com/knative/eventing/tree/main/docs/spec)
 APIs exclusively so that it will work with any Knative installation, even those
 that are not Kubernetes based. It does not help with _installing_ Knative itself
 though. Please refer to the various
diff --git a/docs/dev/developer-guide.md b/docs/dev/developer-guide.md
index b5c41bef..872ed13d 100644
--- a/docs/dev/developer-guide.md
+++ b/docs/dev/developer-guide.md
@@ -8,7 +8,7 @@ _This guide is not complete and has still many gaps that we are going to fill ov
 
 ## Flow
 
-The journey starts at [main.go](https://github.com/knative/client/blob/master/cmd/kn/main.go) which is the entry point when you call `kn`.
+The journey starts at [main.go](https://github.com/knative/client/blob/main/cmd/kn/main.go) which is the entry point when you call `kn`.
 You find here the main control flow, which can be roughly divided into three phases:
 
   - _Bootstrap_ is about retrieving essential configuration parameters from command-line flags, and a configuration file.
@@ -68,7 +68,7 @@ For testing purposes, `config.GlobalConfig` can be replaced by a mock implementa
 
 ## Flags
 
-_This section will hold some information about how flag parsing of commands is supposed to work, including using helper functions for enforcing the conventions defined in [cli conventions](https://github.com/knative/client/blob/master/conventions/cli.md)_
+_This section will hold some information about how flag parsing of commands is supposed to work, including using helper functions for enforcing the conventions defined in [cli conventions](https://github.com/knative/client/blob/main/conventions/cli.md)_
 
 ## Clients for accessing the backend
 
diff --git a/docs/plugins/README.md b/docs/plugins/README.md
index ccdcfd0d..e70c8127 100644
--- a/docs/plugins/README.md
+++ b/docs/plugins/README.md
@@ -4,14 +4,14 @@ Plugins follow a similar architecture to
 [kubectl plugins](https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/)
 with some small differences. One key difference is that `kn` plugins can either
 live in your `PATH` or in a chosen and specified directory.
-[Kn plugins](https://github.com/knative/client/tree/master/docs/cmd/kn_plugin.md)
+[Kn plugins](https://github.com/knative/client/tree/main/docs/cmd/kn_plugin.md)
 show how to install and create new plugins as well as gives some examples and
 best practices.
 
 To see what plugins are installed on your machine, you can use the
-[`plugin`](https://github.com/knative/client/tree/master/docs/cmd/kn_plugin.md)
+[`plugin`](https://github.com/knative/client/tree/main/docs/cmd/kn_plugin.md)
 command group's
-[`list`](https://github.com/knative/client/tree/master/docs/cmd/kn_plugin_list.md)
+[`list`](https://github.com/knative/client/tree/main/docs/cmd/kn_plugin_list.md)
 command.
 
 Plugins provide extended functionality that is not part of the core `kn`
diff --git a/docs/workflows/basic.md b/docs/workflows/basic.md
index fc21c37b..3db83131 100644
--- a/docs/workflows/basic.md
+++ b/docs/workflows/basic.md
@@ -2,7 +2,7 @@
 
 In this basic workflow we show the CRUD (create, read, update, delete) operations
 on a service. We use a well known
-[simple Hello World service](https://github.com/knative/docs/tree/master/docs/serving/samples/hello-world/helloworld-go)
+[simple Hello World service](https://github.com/knative/docs/tree/main/docs/serving/samples/hello-world/helloworld-go)
 that reads the environment variable `TARGET` and prints it as output.
 
 - **Create a service in the `default` namespace from an image**
diff --git a/pkg/kn/commands/source/human_readable_flags.go b/pkg/kn/commands/source/human_readable_flags.go
index f511948a..c86045cf 100644
--- a/pkg/kn/commands/source/human_readable_flags.go
+++ b/pkg/kn/commands/source/human_readable_flags.go
@@ -37,10 +37,19 @@ var sourceTypeDescription = map[string]string{
 	"KafkaSource": "Route events from Apache Kafka Server to addressable",
 }
 
+var sourceTypeSupported = map[string]string{
+	"ApiServerSource": "X",
+	"SinkBinding":     "X",
+	"PingSource":      "X",
+	"ContainerSource": "X",
+	"KafkaSource":     "",
+}
+
 // ListTypesHandlers handles printing human readable table for `kn source list-types`
 func ListTypesHandlers(h printers.PrintHandler) {
 	sourceTypesColumnDefinitions := []metav1beta1.TableColumnDefinition{
 		{Name: "Type", Type: "string", Description: "Kind / Type of the source type", Priority: 1},
+		{Name: "S", Type: "string", Description: "Supported source", Priority: 1},
 		{Name: "Name", Type: "string", Description: "Name of the source type", Priority: 1},
 		{Name: "Description", Type: "string", Description: "Description of the source type", Priority: 1},
 	}
@@ -78,7 +87,7 @@ func printSourceTypes(sourceType unstructured.Unstructured, options printers.Pri
 	row := metav1beta1.TableRow{
 		Object: runtime.RawExtension{Object: &sourceType},
 	}
-	row.Cells = append(row.Cells, kind, name, sourceTypeDescription[kind])
+	row.Cells = append(row.Cells, kind, sourceTypeSupported[kind], name, sourceTypeDescription[kind])
 	return []metav1beta1.TableRow{row}, nil
 }
 


Test patch:
diff --git a/pkg/kn/commands/source/list_test.go b/pkg/kn/commands/source/list_test.go
index 3cf09dde..8eef8b99 100644
--- a/pkg/kn/commands/source/list_test.go
+++ b/pkg/kn/commands/source/list_test.go
@@ -64,9 +64,9 @@ func TestSourceListTypes(t *testing.T) {
 		newSourceCRDObjWithSpec("apiserversources", "sources.knative.dev", "v1alpha1", "ApiServerSource"),
 	)
 	assert.NilError(t, err)
-	assert.Check(t, util.ContainsAll(output[0], "TYPE", "NAME", "DESCRIPTION"))
-	assert.Check(t, util.ContainsAll(output[1], "ApiServerSource", "apiserversources"))
-	assert.Check(t, util.ContainsAll(output[2], "PingSource", "pingsources"))
+	assert.Check(t, util.ContainsAll(output[0], "TYPE", "S", "NAME", "DESCRIPTION"))
+	assert.Check(t, util.ContainsAll(output[1], "ApiServerSource", "X", "apiserversources"))
+	assert.Check(t, util.ContainsAll(output[2], "PingSource", "X", "pingsources"))
 }
 
 func TestSourceListTypesNoHeaders(t *testing.T) {
diff --git a/pkg/serving/v1/gitops_test.go b/pkg/serving/v1/gitops_test.go
index 0c097fd4..814a8cc5 100644
--- a/pkg/serving/v1/gitops_test.go
+++ b/pkg/serving/v1/gitops_test.go
@@ -90,7 +90,7 @@ func TestGitOpsOperations(t *testing.T) {
 		assert.NilError(t, err)
 		assert.DeepEqual(t, fooserviceList, result)
 	})
-	t.Run("create service without master directory", func(t *testing.T) {
+	t.Run("create service without tmp directory", func(t *testing.T) {
 		err := diffClusterClient.CreateService(fooSvc)
 		assert.ErrorContains(t, err, "directory 'tmp' not present, please create the directory and try again")
 	})
diff --git a/test/README.md b/test/README.md
index 313b1ac7..8cc8cd84 100644
--- a/test/README.md
+++ b/test/README.md
@@ -80,7 +80,7 @@ Two e2e tests prow jobs are run in CI:
 The [`upload-test-images.sh`](./upload-test-images.sh) script can be used to
 build and push the test images used by the e2e tests. The script
 expects your environment to be setup as described in
-[DEVELOPMENT.md](https://github.com/knative/serving/blob/master/DEVELOPMENT.md#install-requirements).
+[DEVELOPMENT.md](https://github.com/knative/serving/blob/main/DEVELOPMENT.md#install-requirements).
 
 To run the script for all end to end test images:
 
diff --git a/test/e2e/source_list_test.go b/test/e2e/source_list_test.go
index af8c00d2..94473351 100644
--- a/test/e2e/source_list_test.go
+++ b/test/e2e/source_list_test.go
@@ -39,7 +39,7 @@ func TestSourceListTypes(t *testing.T) {
 
 	t.Log("List available source types")
 	output := sourceListTypes(r)
-	assert.Check(t, util.ContainsAll(output, "TYPE", "NAME", "DESCRIPTION", "Ping", "ApiServer"))
+	assert.Check(t, util.ContainsAll(output, "TYPE", "S", "NAME", "DESCRIPTION", "Ping", "ApiServer"))
 
 	t.Log("List available source types in YAML format")