Skip to content
Merged
Show file tree
Hide file tree
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/build_all_c_apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
uses: actions/checkout@v4
with:
path: sdk
ref: ${{ inputs.sdk_branch }}
ref: ${{ inputs.sdk_branch || github.head_ref }}
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

Using inputs.sdk_branch || github.head_ref can break PRs from forks because github.head_ref is only a branch name and may not exist in this repo. Prefer using github.event.pull_request.head.sha (or refs/pull/${{ github.event.pull_request.number }}/head) when running on pull_request, and fall back to inputs.sdk_branch (or the triggering ref) for workflow_dispatch.

Suggested change
ref: ${{ inputs.sdk_branch || github.head_ref }}
ref: ${{ inputs.sdk_branch != '' && inputs.sdk_branch || (github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref) }}

Copilot uses AI. Check for mistakes.

- name: Install prerequisites
run: pip install --break-system-packages ledgered
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build_rust_sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
uses: actions/checkout@v4
with:
path: c_sdk
ref: ${{ github.head_ref }}
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

github.head_ref is only the branch name and will not reliably resolve for PRs coming from forks (the branch doesn’t exist in the base repo). Consider checking out the PR’s exact commit instead (e.g., use github.event.pull_request.head.sha when github.event_name == 'pull_request'), and fall back to the default ref (or an input) for workflow_dispatch runs.

Suggested change
ref: ${{ github.head_ref }}
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }}

Copilot uses AI. Check for mistakes.
- name: Clone Rust SDK
uses: actions/checkout@v4
with:
Expand Down