Skip to content

Incorrectly disabled "Commit directly to the main branch." UI selection with a branch rule #37655

@ivan-usov

Description

@ivan-usov

Description

  1. Create a repository, add an empty file foo_file
  2. Add a branch rule that protects the main branch, but "unprotects" this file:
Image
  1. Edit foo_file via gitea UI. The "Commit directly to the main branch." is greyed out, even though it's possible to push the change directly to the main branch in that situation. Pushing a commit via git cli works as expected.

Screenshots

Image

Gitea Version

Version: 1.27.0+dev-210-g67f86bc3fe

Can you reproduce the bug on the Gitea demo site?

Yes

Operating System

Ubuntu 24.04

Browser Version

Firefox 150.0.2 (64-bit)

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/uiChange the appearance of the Gitea UItype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions