From b854d7a91b7a671645c98cce7fc38c9ab911adc5 Mon Sep 17 00:00:00 2001 From: Ahmet Alp Balkan Date: Sun, 8 Mar 2026 16:47:53 -0700 Subject: [PATCH] ci: add workflow to warn PRs modifying frozen bash scripts The bash implementations of kubectx/kubens are frozen and no longer accepting improvements. This workflow comments on PRs that modify these files to redirect contributors to the Go implementation. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/bash-frozen.yml | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/bash-frozen.yml diff --git a/.github/workflows/bash-frozen.yml b/.github/workflows/bash-frozen.yml new file mode 100644 index 0000000..b75dd26 --- /dev/null +++ b/.github/workflows/bash-frozen.yml @@ -0,0 +1,35 @@ +name: Bash scripts frozen + +on: + pull_request: + paths: + - 'kubectx' + - 'kubens' + +jobs: + comment: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - name: Comment on PR if author is not ahmetb + if: github.event.pull_request.user.login != 'ahmetb' + uses: actions/github-script@v7 + with: + script: | + const body = [ + '> [!WARNING]', + '> **This PR will not be merged.**', + '>', + '> The bash implementation of `kubectx` and `kubens` is **frozen** and is provided only for convenience.', + '> We are not accepting any improvements to the bash scripts.', + '>', + '> Please propose your improvements to the **Go implementation** instead.', + ].join('\n'); + + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: body + });