[PR #5073] [MERGED] Implement "conversation lock" for issue comments #17624

Closed
opened 2025-11-02 14:33:15 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/5073
Author: @adelowo
Created: 10/11/2018
Status: Merged
Merged: 2/18/2019
Merged by: @lafriks

Base: masterHead: lock_conversation


📝 Commits (10+)

  • 09d170a fix merge conflicts
  • 59b2c1f initial implementation of issue locking
  • 8b6afb3 an issue cannot be locked twice
  • 2496762 add better UI indicators for (un)locked issues
  • af23f1c remove unneccessary form input
  • 815e6ce unlock a locked issue
  • e0698fd only an admin can (un)lock an issue
  • 15b8ed5 update templates
  • fbaa69e update translations
  • 08f7d16 updat translation

📊 Changes

19 files changed (+435 additions, -4 deletions)

View changed files

📝 custom/conf/app.ini.sample (+4 -0)
📝 docs/content/doc/advanced/config-cheat-sheet.en-us.md (+3 -0)
📝 docs/content/doc/features/comparison.en-us.md (+1 -1)
📝 models/issue.go (+4 -0)
📝 models/issue_comment.go (+4 -0)
models/issue_lock.go (+51 -0)
📝 models/migrations/migrations.go (+2 -0)
models/migrations/v80.go (+18 -0)
📝 modules/auth/repo_form.go (+27 -0)
📝 modules/auth/repo_form_test.go (+25 -0)
📝 modules/setting/setting.go (+12 -0)
📝 options/locale/locale_en-US.ini (+19 -0)
📝 routers/api/v1/repo/issue_comment.go (+6 -0)
📝 routers/repo/issue.go (+25 -0)
routers/repo/issue_lock.go (+71 -0)
📝 routers/routes/routes.go (+10 -1)
📝 templates/repo/issue/view_content.tmpl (+33 -1)
📝 templates/repo/issue/view_content/comments.tmpl (+35 -1)
📝 templates/repo/issue/view_content/sidebar.tmpl (+85 -0)

📄 Description

The goal of this PR is to add a lock conversation feature
present in Github.

Fixes https://github.com/go-gitea/gitea/issues/5063 .

  • Lock Conversation
  • Unlock Conversation
  • Update issues templates to show lock events
  • Disable entire comment box when an issue is locked if the user is not an instance admin or repo admin/writer
  • Allow a reason to be specified when locking an issue
screenshot 2018-10-13 at 00 36 06

Youtube video of what it looks like

Conversation lock


🔄 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/5073 **Author:** [@adelowo](https://github.com/adelowo) **Created:** 10/11/2018 **Status:** ✅ Merged **Merged:** 2/18/2019 **Merged by:** [@lafriks](https://github.com/lafriks) **Base:** `master` ← **Head:** `lock_conversation` --- ### 📝 Commits (10+) - [`09d170a`](https://github.com/go-gitea/gitea/commit/09d170ac05531555461da1e5aca9d17d18269f23) fix merge conflicts - [`59b2c1f`](https://github.com/go-gitea/gitea/commit/59b2c1ff8aa78f95af632352b4b192b85403918e) initial implementation of issue locking - [`8b6afb3`](https://github.com/go-gitea/gitea/commit/8b6afb312ea87f1db36657760dbc4a0f2050d089) an issue cannot be locked twice - [`2496762`](https://github.com/go-gitea/gitea/commit/249676214f35ea428b197368c7993341df697cfb) add better UI indicators for (un)locked issues - [`af23f1c`](https://github.com/go-gitea/gitea/commit/af23f1c79ab6b966838e3885f616340b575ec413) remove unneccessary form input - [`815e6ce`](https://github.com/go-gitea/gitea/commit/815e6cefe069b90fa34c948eb36f65d3e84e922f) unlock a locked issue - [`e0698fd`](https://github.com/go-gitea/gitea/commit/e0698fdfa116220fedc4816dcf71e0ece79be08f) only an admin can (un)lock an issue - [`15b8ed5`](https://github.com/go-gitea/gitea/commit/15b8ed557af09946d0a9c143f6d0265ede8890f3) update templates - [`fbaa69e`](https://github.com/go-gitea/gitea/commit/fbaa69ec61d85d020a2fb8efdcc07a77d2449686) update translations - [`08f7d16`](https://github.com/go-gitea/gitea/commit/08f7d16ec21870b8055447c5be53f5c773e848a6) updat translation ### 📊 Changes **19 files changed** (+435 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `custom/conf/app.ini.sample` (+4 -0) 📝 `docs/content/doc/advanced/config-cheat-sheet.en-us.md` (+3 -0) 📝 `docs/content/doc/features/comparison.en-us.md` (+1 -1) 📝 `models/issue.go` (+4 -0) 📝 `models/issue_comment.go` (+4 -0) ➕ `models/issue_lock.go` (+51 -0) 📝 `models/migrations/migrations.go` (+2 -0) ➕ `models/migrations/v80.go` (+18 -0) 📝 `modules/auth/repo_form.go` (+27 -0) 📝 `modules/auth/repo_form_test.go` (+25 -0) 📝 `modules/setting/setting.go` (+12 -0) 📝 `options/locale/locale_en-US.ini` (+19 -0) 📝 `routers/api/v1/repo/issue_comment.go` (+6 -0) 📝 `routers/repo/issue.go` (+25 -0) ➕ `routers/repo/issue_lock.go` (+71 -0) 📝 `routers/routes/routes.go` (+10 -1) 📝 `templates/repo/issue/view_content.tmpl` (+33 -1) 📝 `templates/repo/issue/view_content/comments.tmpl` (+35 -1) 📝 `templates/repo/issue/view_content/sidebar.tmpl` (+85 -0) </details> ### 📄 Description The goal of this PR is to add a ___lock conversation___ feature present in Github. Fixes https://github.com/go-gitea/gitea/issues/5063 . - [x] Lock Conversation - [x] Unlock Conversation - [x] Update issues templates to show lock events - [x] Disable entire comment box when an issue is locked if the user is not an ___instance admin___ or repo admin/writer - [x] Allow a reason to be specified when locking an issue <img width="1920" alt="screenshot 2018-10-13 at 00 36 06" src="https://user-images.githubusercontent.com/12677701/46898272-0502b780-ce80-11e8-8df9-efb77509f71e.png"> > Youtube video of what it looks like [![Conversation lock](https://img.youtube.com/vi/7sV9v3ld_8M/0.jpg)](https://youtu.be/7sV9v3ld_8M) --- <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 14:33:16 -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#17624