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
2 changes: 2 additions & 0 deletions .github/workflows/nx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- next
# TODO use pull_request_target in the future to also run on forks
pull_request:
types: [opened, synchronize, labeled, reopened]
schedule:
Expand All @@ -21,6 +22,7 @@ jobs:
nx:
if: >
(github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository &&

Copilot AI Jan 6, 2026

Copy link

Choose a reason for hiding this comment

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

The condition to check if a PR is from a fork is incorrect. The current condition github.event.pull_request.head.repo.full_name == github.repository will fail when the head repository is null (which happens when a fork is deleted). Additionally, there's a more reliable property specifically designed for this check.

According to GitHub Actions documentation and the pattern used in trigger-circle-ci-workflow.yml (line 28), you should use github.event.pull_request.head.repo.fork instead. This property is a boolean that explicitly indicates whether the PR is from a fork.

The condition should be changed to check that the fork property is false (or the property doesn't exist for same-repo PRs). For example:
github.event.pull_request.head.repo.fork != true

This approach is more robust and handles edge cases like deleted forks better.

Suggested change
github.event.pull_request.head.repo.full_name == github.repository &&
github.event.pull_request.head.repo.fork != true &&

Copilot uses AI. Check for mistakes.
(contains(github.event.pull_request.labels.*.name, 'ci:normal') ||
contains(github.event.pull_request.labels.*.name, 'ci:merged') ||
contains(github.event.pull_request.labels.*.name, 'ci:daily'))
Expand Down
Loading