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

Closed
opened 2025-11-02 06:49:05 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @tna76874 on GitHub (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

Originally created by @tna76874 on GitHub (Oct 30, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): - Git version: Gitea Version: 1.14.0+dev-106-g5b2096dd5 - Operating system: docker - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] 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](https://user-images.githubusercontent.com/47271687/97718252-05e9fe80-1ac6-11eb-8de4-6ae4558f3dbc.jpg)
Author
Owner

@jolheiser commented on GitHub (Oct 30, 2020):

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)

643a0a691a/templates/repo/settings/options.tmpl (L287)

@jolheiser commented on GitHub (Oct 30, 2020): 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) https://github.com/go-gitea/gitea/blob/643a0a691a53a1c13a52edf0a09e8013394b07fe/templates/repo/settings/options.tmpl#L287
Author
Owner

@zeripath commented on GitHub (Oct 30, 2020):

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

643a0a691a/templates/repo/settings/options.tmpl (L274-L281)

@zeripath commented on GitHub (Oct 30, 2020): yup - this should be fixed in the same way as projects bit just above it. https://github.com/go-gitea/gitea/blob/643a0a691a53a1c13a52edf0a09e8013394b07fe/templates/repo/settings/options.tmpl#L274-L281
Author
Owner

@zeripath commented on GitHub (Oct 30, 2020):

I suspect that simply changing line 287 to:

{{if not .IsMirror}}

might actually be enough?

@zeripath commented on GitHub (Oct 30, 2020): I suspect that simply changing line 287 to: ``` {{if not .IsMirror}} ``` might actually be enough?
Author
Owner

@zeripath commented on GitHub (Oct 30, 2020):

I'll add this change to #13360

@zeripath commented on GitHub (Oct 30, 2020): I'll add this change to #13360
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6227