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
10 changes: 7 additions & 3 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,12 @@ jobs:
shell: bash

- id: versions-matrix
# Only run for pull requests if the base repo is different from the head repo, not for workflow_dispatch if not requested, always run for other events
if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository) && (github.event_name != 'workflow_dispatch' || inputs.versions-matrix)
# Only run for:
# - pull requests if the base repo is different from the head repo and the branch name does not start with "cran-"
# Do not run for:
# - workflow_dispatch if not requested
# Always run for other events.
Comment on lines +137 to +140
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

The comment does not accurately describe the conditional logic. The comment states "pull requests if the base repo is different from the head repo and the branch name does not start with 'cran-'", but the code uses OR logic which means it will run when the branch name DOES start with "cran-".

The comment should be updated to accurately reflect that the versions-matrix step runs for:

  • Pull requests when either the head repo is different from the base repo OR the branch starts with "cran-"
  • Other events (with workflow_dispatch conditional on input)
Suggested change
# - pull requests if the base repo is different from the head repo and the branch name does not start with "cran-"
# Do not run for:
# - workflow_dispatch if not requested
# Always run for other events.
# - pull requests when either the base repo is different from the head repo OR the branch name starts with "cran-"
# - other events (except workflow_dispatch when not requested)
# Do not run for:
# - workflow_dispatch if not requested via inputs.versions-matrix

Copilot uses AI. Check for mistakes.
if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository || startsWith(github.head_ref, 'cran-')) && (github.event_name != 'workflow_dispatch' || inputs.versions-matrix)
uses: ./.github/workflows/versions-matrix

- id: dep-suggests-matrix
Expand Down Expand Up @@ -285,7 +289,7 @@ jobs:

runs-on: ${{ matrix.os }}

if: ${{ needs.rcc-smoke.outputs.versions-matrix != '' && (github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.run-rcc-full)) }}
if: ${{ needs.rcc-smoke.outputs.versions-matrix != '' }}

name: 'rcc: ${{ matrix.os }} (${{ matrix.r }}) ${{ matrix.desc }}'

Expand Down