[PR #2242] [MERGED] EnableUnit() -> UnitEnabled() #16303

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

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/2242
Author: @ethantkoenig
Created: 8/1/2017
Status: Merged
Merged: 8/2/2017
Merged by: @lafriks

Base: masterHead: rename/unit


📝 Commits (1)

  • 9d86559 EnableUnit() -> UnitEnabled()

📊 Changes

9 files changed (+29 additions, -36 deletions)

View changed files

📝 models/org_team.go (+2 -2)
📝 models/repo.go (+3 -3)
📝 modules/context/repo.go (+1 -8)
📝 routers/api/v1/api.go (+1 -1)
📝 routers/repo/issue.go (+2 -2)
📝 routers/repo/wiki.go (+2 -2)
📝 templates/org/team/new.tmpl (+1 -1)
📝 templates/repo/header.tmpl (+6 -6)
📝 templates/repo/settings/options.tmpl (+11 -11)

📄 Description

Renames the Repository.EnableUnit(..) and Team.EnableUnit(..) methods (which check if a unit is enabled) to UnitEnabled(..). The original names seems misleading, since EnableUnit(..) sounds like a method that enables a unit, not one that checks if a unit is enabled.

Calls the method in more places to remove boilerplate.


🔄 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/2242 **Author:** [@ethantkoenig](https://github.com/ethantkoenig) **Created:** 8/1/2017 **Status:** ✅ Merged **Merged:** 8/2/2017 **Merged by:** [@lafriks](https://github.com/lafriks) **Base:** `master` ← **Head:** `rename/unit` --- ### 📝 Commits (1) - [`9d86559`](https://github.com/go-gitea/gitea/commit/9d8655967aab39e15ae30409c2d8a07ac072c253) EnableUnit() -> UnitEnabled() ### 📊 Changes **9 files changed** (+29 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `models/org_team.go` (+2 -2) 📝 `models/repo.go` (+3 -3) 📝 `modules/context/repo.go` (+1 -8) 📝 `routers/api/v1/api.go` (+1 -1) 📝 `routers/repo/issue.go` (+2 -2) 📝 `routers/repo/wiki.go` (+2 -2) 📝 `templates/org/team/new.tmpl` (+1 -1) 📝 `templates/repo/header.tmpl` (+6 -6) 📝 `templates/repo/settings/options.tmpl` (+11 -11) </details> ### 📄 Description Renames the `Repository.EnableUnit(..)` and `Team.EnableUnit(..)` methods (which check if a unit is enabled) to `UnitEnabled(..)`. The original names seems misleading, since `EnableUnit(..)` sounds like a method that enables a unit, not one that checks if a unit is enabled. Calls the method in more places to remove boilerplate. --- <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:07:10 -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#16303