Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(release): configure when all branches should be checked for a matching releaseTagPattern #30044

Merged
merged 2 commits into from
Feb 14, 2025

Conversation

JamesHenry
Copy link
Collaborator

@JamesHenry JamesHenry commented Feb 14, 2025

Current Behavior

We always check the current branch for matches for releaseTagPattern and use the latest one of those as the source of truth. We only fall back to checking all branches in case of no matches on the current branch.

In some workflows (e.g. with hotfix branches that received tags getting merged back into trunk) this can lead to an undesired match (because the desired tag was not applied to the trunk branch when the hotfix branch was merged).

Expected Behavior

There is a new releaseTagPatternCheckAllBranchesWhen which controls this behaviour, leaving the default (i.e. the option is undefined) unchanged.

To change the above default behaviour you can:

  • Set "releaseTagPatternCheckAllBranchesWhen": true which means that we should always check all branches for the latest match for "releaseTagPattern"
  • Set "releaseTagPatternCheckAllBranchesWhen": true which means that we should never check all branches for the latest match for "releaseTagPattern", i.e. if the check for a match on the current branch fails to find anything, there is no longer any fallback
  • Set "releaseTagPatternCheckAllBranchesWhen": string[] where each string entry is either a branch name or a glob pattern to match against branch names. In this case we will check all branches (instead of just the current branch) when the current branch matches one of the entries in the array. In other words it's similar true but for a configured subset of current branches

Related Issue(s)

Fixes #

Copy link

vercel bot commented Feb 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Feb 14, 2025 0:18am

Copy link

nx-cloud bot commented Feb 14, 2025

View your CI Pipeline Execution ↗ for commit f0b0383.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 38m 8s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 19s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check --base= --he... ✅ Succeeded 11s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 8s View ↗
nx documentation ✅ Succeeded 3m 27s View ↗

☁️ Nx Cloud last updated this comment at 2025-02-14 13:01:23 UTC

@JamesHenry JamesHenry marked this pull request as ready for review February 14, 2025 10:51
@JamesHenry JamesHenry requested review from a team as code owners February 14, 2025 10:51
@JamesHenry JamesHenry merged commit b10856b into master Feb 14, 2025
12 checks passed
@JamesHenry JamesHenry deleted the releaseTagPatternCheckAllBranchesWhen branch February 14, 2025 13:02
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants