-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Description
Problem
The nx-set-shas action defaults main-branch-name to main, but Nx itself supports configuring the default base branch via defaultBase in nx.json:
{
"defaultBase": "master"
}This means users with repositories that use master (or any other branch) need to duplicate this configuration in both nx.json and the action's with block:
- uses: nrwl/nx-set-shas@v4
with:
main-branch-name: master # duplicates nx.json defaultBaseSuggestion
The action could read nx.json and use defaultBase as the default value for main-branch-name, falling back to main only if neither is specified.
This would:
- Reduce configuration duplication
- Keep the source of truth in one place (
nx.json) - Be more consistent with how Nx itself behaves locally
Context
When the action can't find a successful workflow on the configured branch, it falls back to using the empty tree hash as the base SHA, which causes Nx to analyze the entire repository history. This can be very slow and produces many warnings about packages that no longer exist.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels