[PR #2603] [CLOSED] add sorting to database query of repo_units #16500

Closed
opened 2025-11-02 12:12:04 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/2603
Author: @daviian
Created: 9/25/2017
Status: Closed

Base: masterHead: bugfix/unit-type-sort


📝 Commits (5)

  • e86ed4f sort repo units by type to prevent wrong redirect
  • 80d294a change fixture to create a scenario with wrong sorting of repo_units
  • 4ad6a57 change sorting to index instead of type
  • f556e19 Merge branch 'master' into bugfix/unit-type-sort
  • 0fc1ad6 Merge branch 'master' into bugfix/unit-type-sort

📊 Changes

2 files changed (+14 additions, -14 deletions)

View changed files

📝 models/fixtures/repo_unit.yml (+12 -12)
📝 models/repo_unit.go (+2 -2)

📄 Description

If sorting is wrong and UnitTypeCode is not the first one, a user can't visit to the Code Tab even with required permissions.

Furthermore fixes wrong redirect to leftmost accessible tab in repo view.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/2603 **Author:** [@daviian](https://github.com/daviian) **Created:** 9/25/2017 **Status:** ❌ Closed **Base:** `master` ← **Head:** `bugfix/unit-type-sort` --- ### 📝 Commits (5) - [`e86ed4f`](https://github.com/go-gitea/gitea/commit/e86ed4f6debdc40c9496f67578f95a6edb8d803f) sort repo units by type to prevent wrong redirect - [`80d294a`](https://github.com/go-gitea/gitea/commit/80d294a88d8cf7e68d71e8192c41cda373b026c5) change fixture to create a scenario with wrong sorting of repo_units - [`4ad6a57`](https://github.com/go-gitea/gitea/commit/4ad6a570917f13a97d2d8a5057d10236f056df0b) change sorting to index instead of type - [`f556e19`](https://github.com/go-gitea/gitea/commit/f556e19aca5bafb830255f9b4369a6a05279ccb7) Merge branch 'master' into bugfix/unit-type-sort - [`0fc1ad6`](https://github.com/go-gitea/gitea/commit/0fc1ad6d4c24afaae2a18ace40d94e2894e6c14f) Merge branch 'master' into bugfix/unit-type-sort ### 📊 Changes **2 files changed** (+14 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `models/fixtures/repo_unit.yml` (+12 -12) 📝 `models/repo_unit.go` (+2 -2) </details> ### 📄 Description If sorting is wrong and UnitTypeCode is not the first one, a user can't visit to the `Code` Tab even with required permissions. Furthermore fixes wrong redirect to leftmost accessible tab in repo view. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:12:04 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#16500