Skip to content

Commit 9bc71a5

Browse files
committed
refactor: introduce explicit github_item_number input for precise telemetry tracking across different workflows
1 parent 2a0ba32 commit 9bc71a5

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

action.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ inputs:
9191
description: 'The GitHub workflow name, used for telemetry purposes.'
9292
required: false
9393
default: '${{ github.workflow }}'
94+
github_item_number:
95+
description: 'The Issue or Pull Request number the CLI is operating on. Useful for tracking unique item usage in telemetry. Defaults to the event payload.'
96+
required: false
97+
default: '${{ github.event.issue.number || github.event.pull_request.number }}'
9498

9599
outputs:
96100
summary:
@@ -233,7 +237,7 @@ runs:
233237
USE_PNPM: '${{ inputs.use_pnpm }}'
234238
SURFACE: 'GH'
235239
GH_WORKFLOW_NAME: '${{ steps.sanitize_workflow_name.outputs.gh_workflow_name }}'
236-
GH_EVENT_NUMBER: '${{ github.event.issue.number || github.event.pull_request.number }}'
240+
GH_EVENT_NUMBER: '${{ inputs.github_item_number }}'
237241
shell: 'bash'
238242
run: |-
239243
set -euo pipefail
@@ -417,7 +421,7 @@ runs:
417421
PROMPT: '${{ inputs.prompt }}'
418422
GEMINI_MODEL: '${{ inputs.gemini_model }}'
419423
GH_WORKFLOW_NAME: '${{ steps.sanitize_workflow_name.outputs.gh_workflow_name }}'
420-
GH_EVENT_NUMBER: '${{ github.event.issue.number || github.event.pull_request.number }}'
424+
GH_EVENT_NUMBER: '${{ inputs.github_item_number }}'
421425

422426
- name: 'Upload Gemini CLI outputs'
423427
if: |-
@@ -495,7 +499,7 @@ runs:
495499
GITHUB_ACTION_PATH: '${{ github.action_path }}'
496500
GITHUB_REPOSITORY: '${{ github.repository }}'
497501
GITHUB_RUN_ID: '${{ github.run_id }}'
498-
GITHUB_EVENT_NUMBER: '${{ github.event.issue.number || github.event.pull_request.number }}'
502+
GITHUB_EVENT_NUMBER: '${{ inputs.github_item_number }}'
499503

500504
branding:
501505
icon: 'terminal'

0 commit comments

Comments
 (0)