[PR #4258] [MERGED] Fix topics addition (Another solution) (#4031) #17304

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

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/4258
Author: @axifive
Created: 6/16/2018
Status: Merged
Merged: 6/21/2018
Merged by: @lunny

Base: masterHead: fix-topics-addition


📝 Commits (10+)

📊 Changes

8 files changed (+229 additions, -4 deletions)

View changed files

📝 models/migrations/migrations.go (+2 -0)
models/migrations/v68.go (+160 -0)
📝 models/topic.go (+15 -0)
📝 models/topic_test.go (+13 -0)
📝 options/locale/locale_en-US.ini (+2 -0)
📝 public/js/index.js (+3 -1)
📝 routers/repo/topic.go (+33 -2)
📝 routers/routes/routes.go (+1 -1)

📄 Description

  • Added topics validator (fixed the problems discussed in #4031)
  • Fixed topics duplication in repository.topics field
  • Added migration file for cleanup incorrect topics

Request for check duplicates on explore or user pages:
curl 'https://try.gitea.io/USER/REPO/topics' -H 'Origin: https://try.gitea.io' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Cache-Control: no-cache' -H 'X-Requested-With: XMLHttpRequest' -H 'Cookie: lang=en-US; i_like_gitea=Your_I_LIKE_GITEA; _csrf=Your_CSRF -H 'Connection: keep-alive' -H 'DNT: 1' --data '_csrf=Your_CSRF&topics=go,test,golang,test,go'


🔄 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/4258 **Author:** [@axifive](https://github.com/axifive) **Created:** 6/16/2018 **Status:** ✅ Merged **Merged:** 6/21/2018 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `fix-topics-addition` --- ### 📝 Commits (10+) - [`42096c6`](https://github.com/go-gitea/gitea/commit/42096c63e8b4692e76e91700030f1a7892fe7134) Added topics validation, fixed repo topics duplication (#4031) - [`f2546a7`](https://github.com/go-gitea/gitea/commit/f2546a76d98266039a729b85c39982391bf75af0) Added tests - [`b0e7d00`](https://github.com/go-gitea/gitea/commit/b0e7d001f88b25dfa26f7f762f8b6cfb739ec51a) Fixed fmt - [`6579ddf`](https://github.com/go-gitea/gitea/commit/6579ddf9d83cb6e77e7298b2e4a876e990029e50) Added comments to exported functions - [`630ca59`](https://github.com/go-gitea/gitea/commit/630ca5901c199da5e309868b1b872f622946882d) Deleted RemoveDuplicateTopics function - [`c1364ea`](https://github.com/go-gitea/gitea/commit/c1364ea7179442bbcac2fab4ac9223a7ae71ad06) Fixed messages - [`7f1ec18`](https://github.com/go-gitea/gitea/commit/7f1ec1895dd43b8b2252fc3352d1f86d284a37c9) Added migration - [`1811a6b`](https://github.com/go-gitea/gitea/commit/1811a6b272c87859238451bfbca563b514936524) fmt migration file - [`cab094e`](https://github.com/go-gitea/gitea/commit/cab094ec8d5aa619871362056203ce1e9e211524) fixed lint - [`8fee5d3`](https://github.com/go-gitea/gitea/commit/8fee5d3f64678bb1589a89c40e3d8e8942041f0f) Added Copyright ### 📊 Changes **8 files changed** (+229 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `models/migrations/migrations.go` (+2 -0) ➕ `models/migrations/v68.go` (+160 -0) 📝 `models/topic.go` (+15 -0) 📝 `models/topic_test.go` (+13 -0) 📝 `options/locale/locale_en-US.ini` (+2 -0) 📝 `public/js/index.js` (+3 -1) 📝 `routers/repo/topic.go` (+33 -2) 📝 `routers/routes/routes.go` (+1 -1) </details> ### 📄 Description - Added topics validator (fixed the problems discussed in #4031) - Fixed topics duplication in `repository.topics` field - Added migration file for cleanup incorrect topics **Request for check duplicates on explore or user pages:** `curl 'https://try.gitea.io/USER/REPO/topics' -H 'Origin: https://try.gitea.io' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Cache-Control: no-cache' -H 'X-Requested-With: XMLHttpRequest' -H 'Cookie: lang=en-US; i_like_gitea=Your_I_LIKE_GITEA; _csrf=Your_CSRF -H 'Connection: keep-alive' -H 'DNT: 1' --data '_csrf=Your_CSRF&topics=go,test,golang,test,go'` --- <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:32:08 -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#17304