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

PR options disappears once unchecked. Can not enable Pull Requests again. #13359

Closed
2 of 6 tasks
tna76874 opened this issue Oct 30, 2020 · 4 comments · Fixed by #13360
Closed
2 of 6 tasks

PR options disappears once unchecked. Can not enable Pull Requests again. #13359

tna76874 opened this issue Oct 30, 2020 · 4 comments · Fixed by #13360

Comments

@tna76874
Copy link

tna76874 commented Oct 30, 2020

  • Gitea version (or commit ref):
  • Git version: Gitea Version: 1.14.0+dev-106-g5b2096dd5
  • Operating system: docker
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (--> just create repo and disable PR in options)
    • No
  • Log gist:

Description

  1. Enter repository options
  2. uncheck "Activate Pull requests"
  3. Whole PR option area with all PR-related options are disappearing
  4. How to enable PR for repository again?

Screenshots

missing_PR_options

@jolheiser
Copy link
Member

I think this may be caused by #12808

Instead of checking if PRs can be enabled, it now checks if PRs are enabled. (assuming variables are named semantically)

{{if and (not .IsMirror) (.Repository.UnitEnabled $.UnitTypePullRequests)}}

@zeripath
Copy link
Contributor

yup - this should be fixed in the same way as projects bit just above it.

{{$isProjectsEnabled := .Repository.UnitEnabled $.UnitTypeProjects}}
<div class="inline field">
<label>{{.i18n.Tr "repo.project_board"}}</label>
{{if .UnitTypeProjects.UnitGlobalDisabled}}
<div class="ui checkbox poping up disabled" data-content="{{.i18n.Tr "repo.unit_disabled"}}">
{{else}}
<div class="ui checkbox">
{{end}}

@zeripath
Copy link
Contributor

I suspect that simply changing line 287 to:

{{if not .IsMirror}}

might actually be enough?

@zeripath
Copy link
Contributor

I'll add this change to #13360

zeripath added a commit to zeripath/gitea that referenced this issue Oct 30, 2020
Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit that referenced this issue Oct 30, 2020
* Fix links to repositories in /user/setting/repos

somehow the links gained a spurious $ in the links.

Signed-off-by: Andrew Thornton <art27@cantab.net>

* And fix #13359

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit to zeripath/gitea that referenced this issue Oct 30, 2020
* Fix links to repositories in /user/setting/repos

somehow the links gained a spurious $ in the links.

Signed-off-by: Andrew Thornton <art27@cantab.net>

* And fix go-gitea#13359

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit that referenced this issue Oct 30, 2020
* Fix links to repositories in /user/setting/repos

somehow the links gained a spurious $ in the links.

Signed-off-by: Andrew Thornton <art27@cantab.net>

* And fix #13359

Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Dec 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants