Improve support for external issue references
What does this MR do?
- Fixes referenced bugs related to extracting references to external issues
- Cleans up the code -
Banzai::Filter::IssueReferenceFilter
should not concerned with external issues, because we haveBanzai::Filter::ExternalIssueReferenceFilter
. - Clarifies in the documentation what we support and what we do not support
Are there points in the code the reviewer needs to double check?
General caution, this code was very messy and unintuitive, and it still is.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated [ ] API support added- Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #33679 (closed)
Closes #34076 (closed)
Closes #34082 (closed)
Merge request reports
Activity
assigned to @adamniedzielski
Refers to #34070 (moved)
marked the checklist item Squashed related commits together as completed
marked the checklist item Changelog entry added, if necessary as completed
added 52 commits
-
cd91828f...da6a3fb0 - 51 commits from branch
master
- 7aec837a - Improve support for external issue references
-
cd91828f...da6a3fb0 - 51 commits from branch
@smcgivern can you review please?
assigned to @smcgivern
mentioned in issue #33679 (closed)
marked the checklist item Documentation created/updated as completed
- Resolved by username-removed-443319
- Resolved by username-removed-443319
- Resolved by username-removed-378947
@adamniedzielski thanks, this looks good to me!
Am I right in saying that https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12130 should be responsible for specifying the behaviour when an internal and external issue tracker are both enabled?
changed milestone to %9.4
assigned to @adamniedzielski
mentioned in issue #34082 (closed)
@smcgivern Yes, that's right. This merge request still assumes that there is only one issue tracker enabled. I expect that https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12130 will update the code to remove this assumption.
I believe that: after merging my merge request, if you have both GitLab issue tracker and Redmine enabled,
#123
will point to GitLab issue 123 if it exists or Redmine issue 123 if GitLab issue does not exist. So for external issue references in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12130 we will need a mechanism that disables extracting references to GitLab issues in the current project if GitLab issues are disabled for the current project, even when these issues already exist in the database (because somebody played with GitLab issue tracker but then disabled it). Please note that this is not as simple as "don't runIssueReferenceFilter
when GitLab issue tracker is disabled", because we still needIssueReferenceFilter
for cross-project references to other GitLab projects.What's more, I expect that there might be some additional things with closing issues that we have to update, just after my quick research here.
That said, I do believe that my merge request leaves this area of the codebase in a better shape and these changes will be easier to make.
assigned to @smcgivern
mentioned in commit 0ca6bf4d