ci(triage-skill): Run on opened issues#19423
Conversation
| issues: | ||
| types: [opened] |
There was a problem hiding this comment.
Bug: The workflow may fail when triggered by an issues event because INPUT_ISSUE_NUMBER is set from github.event.inputs.issue_number, which is undefined in that context.
Severity: HIGH
Suggested Fix
Provide a fallback value for the expression to prevent an evaluation error. Change INPUT_ISSUE_NUMBER: ${{ github.event.inputs.issue_number }} to INPUT_ISSUE_NUMBER: ${{ github.event.issue.number || github.event.inputs.issue_number || '' }}. This ensures the expression always evaluates successfully.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: .github/workflows/triage-issue.yml#L4-L5
Potential issue: The GitHub Actions workflow is triggered by both `issues` and
`workflow_dispatch` events. The `INPUT_ISSUE_NUMBER` environment variable is set
directly from `${{ github.event.inputs.issue_number }}`. This property is only defined
for `workflow_dispatch` triggers. When the workflow runs on an `issues` event,
attempting to access this undefined property is likely to cause an expression evaluation
error, failing the workflow step before the script execution begins. This happens
despite the script's conditional logic, which would otherwise handle the value
correctly.
Did we get this right? 👍 / 👎 to inform future reviews.
There was a problem hiding this comment.
yes it does. it uses the EVENT_ISSUE_NUMBER if it's triggered through issues.
EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }}
INPUT_ISSUE_NUMBER: ${{ github.event.inputs.issue_number }}
run: |
if [ "$EVENT_NAME" = "issues" ]; then
ISSUE_NUM="$EVENT_ISSUE_NUMBER"
else
ISSUE_NUM="$INPUT_ISSUE_NUMBER"
fi
Codecov Results 📊Generated by Codecov Action |
size-limit report 📦
|
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
Closes #19424 (added automatically)