[PR #3695] [CLOSED] [RFC] Update issues via pull requests #17048

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

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/3695
Author: @krrutkow
Created: 3/19/2018
Status: Closed

Base: masterHead: add-autoclose-issues-via-pr


📝 Commits (10+)

  • d6ff201 Update issues when a pull request is merged
  • 224f0fd Factor out detection of reference, close, reopen keywords into a more reusable function
  • d418d92 Only change issue status when commits have been merged
  • 06fcda9 Add issue updating from commit messages in new pull request
  • c1dac9c Clean up {Merge,New}PullRequestAction and add UpdatePullRequestAction
  • 32c9209 Add issue updating from commits being tracked by pull requests
  • bb65b7f Fix code formatting
  • cd17446 Rename {Update -> Commit}PullRequestAction to be more accurately named
  • d9ea596 Factor out creation of reference comments
  • 29dacbd Add the UpdateIssuesComment function

📊 Changes

14 files changed (+1323 additions, -166 deletions)

View changed files

📝 models/action.go (+207 -59)
📝 models/action_test.go (+398 -34)
📝 models/issue.go (+12 -0)
📝 models/issue_comment.go (+184 -37)
📝 models/issue_comment_test.go (+31 -5)
📝 models/migrations/migrations.go (+2 -0)
models/migrations/v75.go (+280 -0)
📝 models/pull.go (+54 -19)
📝 models/update.go (+72 -2)
📝 options/locale/locale_en-US.ini (+5 -0)
📝 routers/api/v1/repo/pull.go (+0 -3)
📝 routers/repo/issue.go (+9 -0)
📝 routers/repo/pull.go (+0 -3)
📝 templates/repo/issue/view_content/comments.tmpl (+69 -4)

📄 Description

Various improvements on how issues are referenced, opened, or closed by pull requests. Steps to accomplish:

  • factor out reference, open, and close detection code
  • enable commits in a PR creation or update on the tracked branch to reference issues
  • enable PR and issue title or message to reference issues
  • enable PR and issue comments to reference issues
  • enable a PR's commits to open/close issues when PR is merged (#2735)
  • enable a PR's title or message to open/close issues when PR is merged (#2735)
  • add testing of updates to issues via PR
  • enable a manually merged PR to open/close issues
  • enable code comments to reference issues
  • enable review comment to reference issues
  • add migration to update content of existing references and retroactively create issue references

🔄 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/3695 **Author:** [@krrutkow](https://github.com/krrutkow) **Created:** 3/19/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `add-autoclose-issues-via-pr` --- ### 📝 Commits (10+) - [`d6ff201`](https://github.com/go-gitea/gitea/commit/d6ff2012ee7c503147f736a048cfcc331d78bf94) Update issues when a pull request is merged - [`224f0fd`](https://github.com/go-gitea/gitea/commit/224f0fd21e6f7ac5e1f1aa5c72da6b426837ef65) Factor out detection of reference, close, reopen keywords into a more reusable function - [`d418d92`](https://github.com/go-gitea/gitea/commit/d418d9240d75c65931b7d7f5c53675844768a39e) Only change issue status when commits have been merged - [`06fcda9`](https://github.com/go-gitea/gitea/commit/06fcda97dffd3f28ffcef27e10b8f0ec84bea923) Add issue updating from commit messages in new pull request - [`c1dac9c`](https://github.com/go-gitea/gitea/commit/c1dac9c2f7c18baff194ca7a0d0d7291cf0aa7b7) Clean up {Merge,New}PullRequestAction and add UpdatePullRequestAction - [`32c9209`](https://github.com/go-gitea/gitea/commit/32c9209d346c859e6476340ebc48e9a2d769391f) Add issue updating from commits being tracked by pull requests - [`bb65b7f`](https://github.com/go-gitea/gitea/commit/bb65b7fdcc4652262958b7512fdc50b415f712e2) Fix code formatting - [`cd17446`](https://github.com/go-gitea/gitea/commit/cd174460c18728b3630d564897ac12f65f4d1628) Rename {Update -> Commit}PullRequestAction to be more accurately named - [`d9ea596`](https://github.com/go-gitea/gitea/commit/d9ea59676d499f113f2549c7f7ecd6792bbae3b1) Factor out creation of reference comments - [`29dacbd`](https://github.com/go-gitea/gitea/commit/29dacbd97c6558ff86e4ccae13fb37b6ea8174c2) Add the UpdateIssuesComment function ### 📊 Changes **14 files changed** (+1323 additions, -166 deletions) <details> <summary>View changed files</summary> 📝 `models/action.go` (+207 -59) 📝 `models/action_test.go` (+398 -34) 📝 `models/issue.go` (+12 -0) 📝 `models/issue_comment.go` (+184 -37) 📝 `models/issue_comment_test.go` (+31 -5) 📝 `models/migrations/migrations.go` (+2 -0) ➕ `models/migrations/v75.go` (+280 -0) 📝 `models/pull.go` (+54 -19) 📝 `models/update.go` (+72 -2) 📝 `options/locale/locale_en-US.ini` (+5 -0) 📝 `routers/api/v1/repo/pull.go` (+0 -3) 📝 `routers/repo/issue.go` (+9 -0) 📝 `routers/repo/pull.go` (+0 -3) 📝 `templates/repo/issue/view_content/comments.tmpl` (+69 -4) </details> ### 📄 Description Various improvements on how issues are referenced, opened, or closed by pull requests. Steps to accomplish: - [x] factor out reference, open, and close detection code - [x] enable commits in a PR creation or update on the tracked branch to reference issues - [x] enable PR and issue title or message to reference issues - [x] enable PR and issue comments to reference issues - [x] enable a PR's commits to open/close issues when PR is merged (#2735) - [x] enable a PR's title or message to open/close issues when PR is merged (#2735) - [x] add testing of updates to issues via PR - [x] enable a manually merged PR to open/close issues - [x] enable code comments to reference issues - [x] enable review comment to reference issues - [x] add migration to update content of existing references and retroactively create issue references --- <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:25: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#17048