From 714f1ce71d026975492ab3e12426c9faeb195ee9 Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Sat, 13 Jan 2024 13:17:03 +0200 Subject: [PATCH 1/6] Verify the length of contexts in the kubeconfig before trying to current context in the namespace command --- cmd/namespace.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/namespace.go b/cmd/namespace.go index 09bd3c94..1b43e3cf 100644 --- a/cmd/namespace.go +++ b/cmd/namespace.go @@ -41,6 +41,10 @@ func (nc *NamespaceCommand) runNamespace(command *cobra.Command, args []string) if err != nil { return err } + if len(config.Contexts) == 0 { + return fmt.Errorf("no valid context found") + } + currentContext := config.CurrentContext contNs := config.Contexts[currentContext].Namespace namespaceList, err := GetNamespaceList(contNs) From 061be19f02b6dd9e97120247d6fcbed84762a272 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sat, 13 Jan 2024 01:56:14 +0000 Subject: [PATCH 2/6] update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 72adeb8e..ef9d61e5 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d Jia Sui
Jia Sui

💻 AdamRussak
AdamRussak

💻 Rui Chen
Rui Chen

🚇 + Michael Burman
Michael Burman

🐛 💻 From de28d1ac42030362120b5deb52a20b72527a9754 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sat, 13 Jan 2024 01:56:15 +0000 Subject: [PATCH 3/6] update docs/en-us/contribute.md --- docs/en-us/contribute.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en-us/contribute.md b/docs/en-us/contribute.md index 9521c090..0dd06cda 100644 --- a/docs/en-us/contribute.md +++ b/docs/en-us/contribute.md @@ -80,6 +80,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d Jia Sui
Jia Sui

💻 AdamRussak
AdamRussak

💻 Rui Chen
Rui Chen

🚇 + Michael Burman
Michael Burman

🐛 💻 From dd90e35bcb2e0fa53ee481940d42c8c33064ea66 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sat, 13 Jan 2024 01:56:16 +0000 Subject: [PATCH 4/6] update docs/zh-cn/contribute.md --- docs/zh-cn/contribute.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/zh-cn/contribute.md b/docs/zh-cn/contribute.md index 28802fc9..16f74d96 100644 --- a/docs/zh-cn/contribute.md +++ b/docs/zh-cn/contribute.md @@ -37,6 +37,7 @@ Jia Sui
Jia Sui

💻 AdamRussak
AdamRussak

💻 Rui Chen
Rui Chen

🚇 + Michael Burman
Michael Burman

🐛 💻 From f64cd9ea5147e726d3a7acb481a431140e830b66 Mon Sep 17 00:00:00 2001 From: "allcontributors[bot]" <46447321+allcontributors[bot]@users.noreply.github.com> Date: Sat, 13 Jan 2024 01:56:17 +0000 Subject: [PATCH 5/6] update .all-contributorsrc --- .all-contributorsrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index bc89ac73..63aee0b5 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -185,6 +185,16 @@ "contributions": [ "infra" ] + }, + { + "login": "burmanm", + "name": "Michael Burman", + "avatar_url": "https://avatars.githubusercontent.com/u/562574?v=4", + "profile": "https://github.com/burmanm", + "contributions": [ + "bug", + "code" + ] } ], "contributorsPerLine": 7, From 61d5f77b7e07ba2d7daf9fec321363a1e5d46281 Mon Sep 17 00:00:00 2001 From: Xudong Guo Date: Mon, 15 Jan 2024 09:34:34 +0800 Subject: [PATCH 6/6] =?UTF-8?q?ci:=20=F0=9F=8E=A1=20fix=20=20codeql=20acti?= =?UTF-8?q?on=20(#854)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/codeql-analysis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 5ba162e6..5f660180 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -44,6 +44,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Install Go + uses: actions/setup-go@v4 + with: + go-version-file: go.mod + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3