Skip to content

Conversation

@HellAholic
Copy link
Contributor

Fix the trigger condition for the npm package on PRs against main:

head_ref (current branch) -> base_ref (target branch)

As no PR will be made  on main (the condition for `head_ref` will always return false).
Replaced with `base_ref` to check if the PR is against main instead.
@HellAholic HellAholic requested a review from Copilot April 25, 2025 08:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the trigger condition for the npm package workflow to correctly check for pull requests targeting the main branch.

  • Changed the pull_request trigger condition from comparing github.head_ref to 'main' to comparing github.base_ref to 'main'.
Comments suppressed due to low confidence (1)

.github/workflows/package.yml:37

  • The updated condition now correctly checks github.base_ref for pull requests targeting the main branch. Please double-check that this change consistently meets the intended workflow trigger criteria for all relevant PR events.
if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || startsWith(github.ref_name, 'NP-'))) || (github.event_name == 'pull_request' && github.base_ref == 'main') }}

@HellAholic HellAholic changed the title head_ref -> base_ref Trigger NPM package on PR against main: head_ref -> base_ref Apr 25, 2025
@HellAholic HellAholic merged commit 3d9ef41 into main Apr 25, 2025
6 checks passed
@HellAholic HellAholic deleted the NP-874_patch_if_condition branch April 25, 2025 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants