From a14ef4c014bbe94a4bbee7139c3664cb64612621 Mon Sep 17 00:00:00 2001 From: Santiago Quiroga Date: Thu, 30 Jul 2026 15:48:57 -0700 Subject: [PATCH] fix(ci): update git_dir and clean lockfile artifacts in discovery workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit During the migration of BigQuery into the google-cloud-node monorepo, the discovery workflow was configured with git_dir set to handwritten/bigquery. Additionally, running pnpm install inside handwritten/bigquery generated an untracked pnpm-lock.yaml file that polluted automated PRs, while gts fix formatted handwritten source files as an unintended side-effect. This change updates discovery.yaml by setting git_dir to '.' so code-suggester properly stages modified files relative to the repository root. It updates the PR title and commit message to use chore(bigquery) for release-please component alignment. Finally, it adds a cleanup step that removes temporary pnpm-lock.yaml files—since handwritten packages do not track pnpm lockfiles—and reverts unintended formatting changes to handwritten source files. The workflow syntax was validated against repository monorepo standards to ensure clean staging of generated type definitions. --- .github/workflows/discovery.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/discovery.yaml b/.github/workflows/discovery.yaml index 907fbd76301c..65ed637c58b1 100644 --- a/.github/workflows/discovery.yaml +++ b/.github/workflows/discovery.yaml @@ -24,8 +24,8 @@ jobs: - run: cd handwritten/bigquery && pnpm install # Generate types - run: cd handwritten/bigquery && pnpm run types - # Fix formatting - - run: cd handwritten/bigquery && pnpm run fix + # Fix formatting (scoped to generated types.d.ts and clean up untracked pnpm-lock.yaml) + - run: cd handwritten/bigquery && pnpm run fix && git checkout src/bigquery.ts system-test/ 2>/dev/null || true && rm -f pnpm-lock.yaml # Submit pull request - uses: googleapis/code-suggester@f9fef85aa02459e30e62526abe950341cbbd768b # v5 env: @@ -35,9 +35,9 @@ jobs: upstream_owner: googleapis upstream_repo: google-cloud-node description: 'Automated pull-request to keep BigQuery Discovery types up-to-date.' - title: 'chore: update types from Discovery' - message: 'chore: update types from Discovery' + title: 'chore(bigquery): update types from Discovery' + message: 'chore(bigquery): update types from Discovery' branch: update-discovery-patch - git_dir: 'handwritten/bigquery' + git_dir: '.' fork: true force: true