From 14da54dc3c4f0c885837c9a20991dbe6a5feb3dd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 6 Feb 2026 16:23:37 +0000 Subject: [PATCH 1/5] Initial plan From d0cd08e9a633f967720706e8c316697dafa82c65 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 6 Feb 2026 16:25:37 +0000 Subject: [PATCH 2/5] Add initial workflow and Makefile for understanding the issue Co-authored-by: gregmankes <8827475+gregmankes@users.noreply.github.com> --- .github/workflows/build.yml | 36 ++++++++++++++++++++++++++++++++++++ Makefile | 29 +++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 Makefile diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..5ce74ef --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: Check Generated Files +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + verify-generation: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v5 + - name: Run commands generation command + run: make gen + - name: Verify no changes were generated + run: | + # Check if there are any uncommitted changes in the working directory + if [ -z "$(git status --porcelain)" ]; then + echo "::notice::Generated files are up to date. No changes detected." + else + echo "::error::Detected uncommitted changes after running the generation command. Please run the generator and commit the changes." + git status + git diff + exit 1 + fi + build: + runs-on: ubuntu-latest + needs: verify-generation + steps: + - name: Checkout repository + uses: actions/checkout@v5 + - name: Build the cli binary + run: make build diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6803914 --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +.PHONY: all install gen build test + +# Load .env file if it exists (for local development) +# In CI/CD, environment variables are provided by the environment +-include .env +ifneq (,$(wildcard .env)) +export $(shell sed 's/=.*//' .env) +endif + +all: gen build test + +# we need to install gen-commands directly because gen-commands does not have its +# own go.mod +install: +rm -rf ./cli +git clone https://github.com/temporalio/cli && cd ./cli && go install ./cmd/gen-commands && cd .. +rm -rf ./cli + +gen: install +gen-commands -input ./temporalcloudcli/commands.yml -pkg temporalcloudcli > ./temporalcloudcli/commands.gen.go + +build: +go build ./cmd/temporal-cloud + +test-integration: +go test -tags=integration ./... + +test: +go test ./... From 1dfc455f35d2ed269a3e08b2f2aef74e875a0286 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 6 Feb 2026 16:26:01 +0000 Subject: [PATCH 3/5] Add Go bin directory to GitHub Actions PATH to fix gen-commands not found error Co-authored-by: gregmankes <8827475+gregmankes@users.noreply.github.com> --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5ce74ef..df1e339 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,6 +13,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v5 + - name: Add Go bin to PATH + run: echo "$HOME/go/bin" >> $GITHUB_PATH - name: Run commands generation command run: make gen - name: Verify no changes were generated From 3ebf9e341fa0702c6c9edda7c1de79df58648b19 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 6 Feb 2026 16:27:12 +0000 Subject: [PATCH 4/5] Add Go setup steps and remove trailing whitespace per code review feedback Co-authored-by: gregmankes <8827475+gregmankes@users.noreply.github.com> --- .github/workflows/build.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index df1e339..c0a29dc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,10 +13,14 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v5 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' - name: Add Go bin to PATH run: echo "$HOME/go/bin" >> $GITHUB_PATH - name: Run commands generation command - run: make gen + run: make gen - name: Verify no changes were generated run: | # Check if there are any uncommitted changes in the working directory @@ -34,5 +38,9 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v5 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' - name: Build the cli binary run: make build From ebd44de7780fd13f95fb2dee11776c0c4302474f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 6 Feb 2026 16:28:30 +0000 Subject: [PATCH 5/5] Add workflow permissions to limit GITHUB_TOKEN access per security check Co-authored-by: gregmankes <8827475+gregmankes@users.noreply.github.com> --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c0a29dc..63920a7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,6 +10,8 @@ on: jobs: verify-generation: runs-on: ubuntu-latest + permissions: + contents: read steps: - name: Checkout repository uses: actions/checkout@v5 @@ -35,6 +37,8 @@ jobs: build: runs-on: ubuntu-latest needs: verify-generation + permissions: + contents: read steps: - name: Checkout repository uses: actions/checkout@v5