When specifying branches in branch protection, an unexpected behavior occurs. (OD-2233)
alion opened 1 year ago

Scenario: 4 branches: main, my-docs, your-docs, and him-docs. When clicking Add Rule , click the Branch field, I can see that

截屏2024-12-30 下午6.56.31.png

When selecting '-' under the Branch field, I can see that my-docs appears twice, your-docs appears twice, and him-docs appears twice.

截屏2024-12-30 下午6.59.48.png

And If we then select the first my-docs, the '-' character disappears. However, if we select the second my-docs, the '-' character remains.

  • Robin Shen commented 1 year ago

    This is expected behavior. When you input '-', one suggestion entry suggests exclude the branch, and another suggests to match the branch with '-' (note bold '-' in this entry).

  • alion commented 1 year ago

    And If we then select the first my-docs, the '-' character disappears. However, if we select the second my-docs, the '-' character remains.

    Does this behavior is expected too?

  • Robin Shen changed state to 'Closed' 1 year ago
    Previous Value Current Value
    Open
    Closed
  • Robin Shen commented 1 year ago

    Yes. The first suggestion interpretes - as trying to match my-docs, while the second interpretes - as excuding my-docs.

  • alion commented 1 year ago

    This explanation also makes sense, but this behavior will inevitably confuse users. Why does it still match when I clearly selected the exclude operator?

  • alion commented 1 year ago

    After all, users don’t understand the deeper principles behind this; they only find the final result quite confusing.

  • alion commented 1 year ago

    I think the priority of operators should be higher than matching.

  • Robin Shen commented 1 year ago

    Filed an improvement request OD-2236

  • alion commented 1 year ago

    Thank you for this

issue 1/1
Type
Bug
Priority
Normal
Assignee
Affected Versions
11.6.8
Labels
No labels
Issue Votes (0)
Watchers (2)
Reference
OD-2233
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover