Open arvidboivie opened 2 months ago
Trying to set up builds with @nx-tools/nx-container on a CodeBuild with a Bitbucket Server source, I'm getting this error:
@nx-tools/nx-container
Unsupported CI Provider... Using Git as fallback [..] NX Unsupported detached HEAD ref in "HEAD, origin/feature/branch-name, feature/branch-name"
As far as I can tell, this is because when using the git context (specifically on this line: https://github.com/gperdomor/nx-tools/blob/df601249cd340686169cf7488e1f7adf030692f9/packages/ci-context/src/lib/utils/git.ts#L84) the regex fails to pick up branch names with a slash in them. I think this should be supported, since prefixes like feature/ or bugfix/ are fairly common.
feature/
bugfix/
Replacing the second [^/]+ with something more permissive should fix this, but perhaps there's other complexities I'm not aware of.
[^/]+
Trying to set up builds with
@nx-tools/nx-container
on a CodeBuild with a Bitbucket Server source, I'm getting this error:As far as I can tell, this is because when using the git context (specifically on this line: https://github.com/gperdomor/nx-tools/blob/df601249cd340686169cf7488e1f7adf030692f9/packages/ci-context/src/lib/utils/git.ts#L84) the regex fails to pick up branch names with a slash in them. I think this should be supported, since prefixes like
feature/
orbugfix/
are fairly common.Replacing the second
[^/]+
with something more permissive should fix this, but perhaps there's other complexities I'm not aware of.