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

Showing command line instructions on pull request despite branch protection existing #17121

Closed
my1e5 opened this issue Sep 22, 2021 · 0 comments · Fixed by #17339
Closed

Showing command line instructions on pull request despite branch protection existing #17121

my1e5 opened this issue Sep 22, 2021 · 0 comments · Fixed by #17339
Labels
type/docs This PR mainly updates/creates documentation

Comments

@my1e5
Copy link

my1e5 commented Sep 22, 2021

Gitea Version

1.15.3

Git Version

N/A

Operating System

N/A

How are you running Gitea?

Running on a Linux machine

Database

MySQL

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Description

https://try.gitea.io/my1e5_test_user/Test-Repo/pulls/1

I have branch protection enabled on my 'master' branch so that "No pushing will be allowed to this branch"

image

However, on my pull request it shows these command line instructions which technically are not valid as I have branch protection enabled. git push origin master wouldn't work.

image

I feel this is slightly inelegant. Is there a way to make it so that if branch protection is enabled, these command line instructions are not shown?

Or alternatively, create a setting that allows you to disable showing these command line instructions? I don't want it to confuse users - I've had a user ask why these instructions are showing when branch protection is enabled.

Thanks!

Screenshots

No response

@lunny lunny added the type/docs This PR mainly updates/creates documentation label Sep 22, 2021
zeripath pushed a commit that referenced this issue Oct 17, 2021
Hides the command line instructions if the authenticated user can't push to the base branch.
Closes #17121
Chianina pushed a commit to Chianina/gitea that referenced this issue Mar 28, 2022
…7339)

Hides the command line instructions if the authenticated user can't push to the base branch.
Closes go-gitea#17121
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants