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

Cancel Branch Protection form doesn't cancel #25038

Closed
maospr opened this issue Jun 1, 2023 · 1 comment · Fixed by #25063
Closed

Cancel Branch Protection form doesn't cancel #25038

maospr opened this issue Jun 1, 2023 · 1 comment · Fixed by #25063
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Milestone

Comments

@maospr
Copy link

maospr commented Jun 1, 2023

Description

Simplest way to reproduce is to add a new protection rule, enter a branch name pattern & scroll down to click 'Cancel'.
The result is a new rule with that name, I expected that no rule would be added.

The same goes for editing existing rules and clicking 'Cancel', it always tries to persist the changes instead of actually cancelling.

I've reproduced this on the Gitea demo site:
https://try.gitea.io/tester-bob/branch_prot_test/settings/branches

But the same issue is also present on version 1.19.2.

Gitea Version

1.20.0+dev-973-g5d23c885e

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

Before:
image

Add new rule:
image
&Cancel:
image

After:
image

Git Version

2.40.1

Operating System

FreeBSD 13.2

How are you running Gitea?

Gitea is running within a FreeBSD jail and installed through the FreeBSD package manager.

Database

PostgreSQL

@maospr maospr added the type/bug label Jun 1, 2023
@wxiaoguang
Copy link
Contributor

The "Cancel" button was added by #20825 , but it is also a "submit" button, so it needs to be changed to a <a> with link.

@wxiaoguang wxiaoguang added this to the 1.20.0 milestone Jun 1, 2023
@wxiaoguang wxiaoguang added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Jun 1, 2023
lunny pushed a commit that referenced this issue Jun 3, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants