File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -464,7 +464,7 @@ async function transferIssues() {
464
464
for ( let issue of issues ) {
465
465
// try to find a GitHub issue that already exists for this GitLab issue
466
466
let githubIssue = githubIssues . find (
467
- i => i . title . trim ( ) === issue . title . trim ( )
467
+ i => i . title . trim ( ) === issue . title . trim ( ) && i . body . includes ( issue . web_url )
468
468
) ;
469
469
if ( ! githubIssue ) {
470
470
console . log ( `\nMigrating issue #${ issue . iid } ('${ issue . title } ')...` ) ;
@@ -563,14 +563,14 @@ async function transferMergeRequests() {
563
563
// Try to find a GitHub pull request that already exists for this GitLab
564
564
// merge request
565
565
let githubRequest = githubPullRequests . find (
566
- i => i . title . trim ( ) === mr . title . trim ( )
566
+ i => i . title . trim ( ) === mr . title . trim ( ) && i . body . includes ( mr . web_url )
567
567
) ;
568
568
let githubIssue = githubIssues . find (
569
569
// allow for issues titled "Original Issue Name - [merged|closed]"
570
570
i => {
571
571
// regex needs escaping in case merge request title contains special characters
572
572
const regex = new RegExp ( escapeRegExp ( mr . title . trim ( ) ) + ' - \\[(merged|closed)\\]' ) ;
573
- return regex . test ( i . title . trim ( ) ) ;
573
+ return regex . test ( i . title . trim ( ) ) && i . body . includes ( mr . web_url ) ;
574
574
}
575
575
) ;
576
576
if ( ! githubRequest && ! githubIssue ) {
You can’t perform that action at this time.
0 commit comments