Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .github/workflows/samples-typescript-typecheck.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
name: TypeScript clients type checks

on:
push:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: Adding a push trigger alongside pull_request runs this workflow twice for the same commit on any in-repo feature branch that has an open PR. For fork-based PRs only pull_request fires, but for same-repo branches the duplication partially undercuts the PR's stated goal of reducing CI noise. Consider dropping the push trigger or restricting it to master.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/samples-typescript-typecheck.yaml, line 4:

<comment>Adding a push trigger alongside pull_request runs this workflow twice for the same commit on any in-repo feature branch that has an open PR. For fork-based PRs only pull_request fires, but for same-repo branches the duplication partially undercuts the PR's stated goal of reducing CI noise. Consider dropping the push trigger or restricting it to master.</comment>

<file context>
@@ -1,9 +1,22 @@
 name: TypeScript clients type checks
 
 on:
+  push:
+    paths:
+      - samples/client/petstore/typescript*/**
</file context>

branches:
- master
paths:
- samples/client/petstore/typescript*/**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The 7-path filter list is duplicated verbatim between the push and pull_request blocks, and it must stay in sync with both the added paths allowlist and the directories bin/ts-typecheck-all.sh iterates. Any future TypeScript sample added outside these globs (or a path fix applied to only one block) silently skips the typecheck. Consider hoisting the shared list (e.g. via a yaml anchor or a composite action) so it is maintained in one place.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/samples-typescript-typecheck.yaml, line 8:

<comment>The 7-path filter list is duplicated verbatim between the `push` and `pull_request` blocks, and it must stay in sync with both the added `paths` allowlist and the directories `bin/ts-typecheck-all.sh` iterates. Any future TypeScript sample added outside these globs (or a path fix applied to only one block) silently skips the typecheck. Consider hoisting the shared list (e.g. via a `yaml` anchor or a composite action) so it is maintained in one place.</comment>

<file context>
@@ -1,9 +1,24 @@
+    branches:
+      - master
+    paths:
+      - samples/client/petstore/typescript*/**
+      - samples/client/others/typescript*/**
+      - samples/client/echo_api/typescript*/**
</file context>

- samples/client/others/typescript*/**
- samples/client/echo_api/typescript*/**
- samples/openapi3/client/petstore*/typescript/**
- samples/server/petstore/typescript-nestjs-server/**
- bin/ts-typecheck-all.sh
- .github/workflows/samples-typescript-typecheck.yaml
pull_request:
paths:
- samples/**
- samples/client/petstore/typescript*/**
- samples/client/others/typescript*/**
- samples/client/echo_api/typescript*/**
- samples/openapi3/client/petstore*/typescript/**
- samples/server/petstore/typescript-nestjs-server/**
- bin/ts-typecheck-all.sh
- .github/workflows/samples-typescript-typecheck.yaml
jobs:
Expand Down
Loading