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
7 changes: 7 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: 'build-test'
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
- 'releases/*'
- 'v*'
Comment on lines +4 to +9
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add branch filtering to pull_request trigger for consistency.

The pull_request trigger lacks branch filters while the push trigger restricts to master, releases/*, and v* branches. This inconsistency means pull requests from any branch targeting any branch will trigger the workflow, which may not align with your intent. For consistency and to avoid unnecessary workflow runs, add branch filters to the pull_request trigger:

  on:
    workflow_dispatch:
-   pull_request:
+   pull_request:
+     branches:
+       - master
+       - 'releases/*'
+       - 'v*'
    push:
      branches:
        - master
        - 'releases/*'
        - 'v*'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
pull_request:
push:
branches:
- master
- 'releases/*'
- 'v*'
pull_request:
branches:
- master
- 'releases/*'
- 'v*'
push:
branches:
- master
- 'releases/*'
- 'v*'
🤖 Prompt for AI Agents
.github/workflows/test.yml around lines 4 to 9: the pull_request trigger
currently has no branch filters while push is limited to master, releases/*, and
v*; update the pull_request trigger to include the same branch filters (master,
'releases/*', and 'v*') so the workflow only runs for PRs targeting those
branches, mirroring the push configuration.


jobs:
build: # make sure build/ci work properly
Expand All @@ -11,6 +17,7 @@ jobs:
npm install
npm run all
test: # make sure the action works on a clean machine without building
if: ${{ github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
Loading