You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From what I can tell, it's currently not possible to negate the value calculated by is_default_branch. This makes it harder to disable a tag for all branches other than the default branch.
This could be supported by either adding a specific is_not_default_branch or with a not (...) helper (though given that is_default_branch is the only Global expression that this would work with, it seems rather pointless). An alternative, but probably larger change could be to support a disable attribute that reverses the logic used by enable.
If I've overlooked a way to do this that already exists, please let me know! Happy to work on a PR to support this if some guidance on preferred solution can be given.
Example workflow
The example workflow below has two tags - one which uses is_default_branch and adds the this-is-main- prefix, and a second which adds the this-is-not- prefix. Currently the only way to do this is to fall back to standard Github Workflow expressions.
From what I can tell, it's currently not possible to negate the value calculated by
is_default_branch
. This makes it harder to disable a tag for all branches other than the default branch.This could be supported by either adding a specific
is_not_default_branch
or with anot (...)
helper (though given thatis_default_branch
is the only Global expression that this would work with, it seems rather pointless). An alternative, but probably larger change could be to support adisable
attribute that reverses the logic used byenable
.If I've overlooked a way to do this that already exists, please let me know! Happy to work on a PR to support this if some guidance on preferred solution can be given.
Example workflow
The example workflow below has two tags - one which uses
is_default_branch
and adds thethis-is-main-
prefix, and a second which adds thethis-is-not-
prefix. Currently the only way to do this is to fall back to standard Github Workflow expressions.The text was updated successfully, but these errors were encountered: