Conversation
There was a problem hiding this comment.
Pull request overview
This PR synchronizes CI/CD workflow configurations with a standard template, simplifying heredoc-style command patterns and updating conditional logic for workflow execution.
Changes:
- Simplified jq command invocations by replacing heredoc syntax with more straightforward echo and pipe patterns
- Added explicit database parameter to R package dependency lookup
- Updated conditional logic for when version matrix tests should run
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/update-snapshots/action.yml |
Simplified jq command for processing matrix configuration from heredoc to echo/pipe |
.github/workflows/dep-suggests-matrix/action.R |
Added explicit db = installed.packages() parameter to tools::package_dependencies() call |
.github/workflows/commit-suggest.yaml |
Simplified jq command for displaying event payload from heredoc to echo/pipe |
.github/workflows/R-CMD-check.yaml |
Updated comments and conditional logic for versions-matrix step and removed event type restrictions from rcc-full job |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Do not run 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 || startsWith(github.head_ref, 'cran-')) && (github.event_name != 'workflow_dispatch' || inputs.versions-matrix) |
There was a problem hiding this comment.
The logic in this conditional expression appears incorrect. The comment states "Only run for: pull requests if the base repo is different from the head repo and the branch name does not start with 'cran-'", but the code implements the opposite logic for the branch check.
The current condition uses OR (||) which means the step WILL run if the branch starts with "cran-", but the comment says it should NOT run in that case.
The condition should be:
- For pull requests: run if (base repo != head repo) AND (branch does NOT start with "cran-")
This requires changing the OR to AND and negating the startsWith check:
github.event.pull_request.head.repo.full_name != github.repository && !startsWith(github.head_ref, 'cran-')
| 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) | |
| 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) |
37a897c to
8913e86
Compare
No description provided.