Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/style-check.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Code Style Check

on: [push, pull_request_target]
on: [push]

Copy link

Choose a reason for hiding this comment

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

Bug: The workflow will fail on push events because the eslint_check_upload and prettier jobs use pull-request-specific context variables that are unavailable.
Severity: CRITICAL | Confidence: High

🔍 Detailed Analysis

The workflow trigger was changed to only push, but the eslint_check_upload and prettier jobs were not updated. These jobs attempt to use context variables ${{ github.event.pull_request.head.repo.full_name }} and ${{ github.head_ref }}, which are only available for pull_request related events. When this workflow runs on a push event, these variables will be null, causing the jobs to fail and the workflow run to crash.

💡 Suggested Fix

Update the eslint_check_upload and prettier jobs to handle push events. This could involve adding conditionals to skip the steps that use pull request context on push events, or refactoring them to not depend on github.event.pull_request and github.head_ref.

🤖 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/style-check.yml#L4

Potential issue: The workflow trigger was changed to only `push`, but the
`eslint_check_upload` and `prettier` jobs were not updated. These jobs attempt to use
context variables `${{ github.event.pull_request.head.repo.full_name }}` and `${{
github.head_ref }}`, which are only available for `pull_request` related events. When
this workflow runs on a `push` event, these variables will be null, causing the jobs to
fail and the workflow run to crash.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 7727795

jobs:
eslint_check_upload:
Expand Down
Loading