You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there are multiple gitlab issues missing in a row, the current code will not correctly create placeholder issues. I faked a dummy gitlab setup, only containing gitlab issues #15, #16 and #17 (with issues #1 to #14 being non-existent). The current code will turn the set of gitlab issues into [ { iid: 1 }, { iid: 15 }, { iid: 3 }, { iid: 16 }, { iid: 5 }, { iid: 17 } ]
I tested it with the following code, where the for loop is exactly the same as on the master branch currently:
const gitlabIssues = [
{iid: 15},
{iid: 16},
{iid: 17}
];
for (let i = 0; i < gitlabIssues.length; i++) {
// GitLab issue internal Id (iid)
let expectedIdx = i + 1;
// is there a gap in the GitLab issues?
// Create placeholder issues so that new GitHub issues will have the same
// issue number as in GitLab. If a placeholder is used it is because there
// was a gap in GitLab issues -- likely caused by a deleted GitLab issue.
if (gitlabIssues[i].iid != expectedIdx) {
gitlabIssues.splice(i, 0, {
iid: expectedIdx
});
i++;
console.log('Added placeholder issue for GitLab issue #' + expectedIdx);
console.log("gitlabIssues now looks like this:", gitlabIssues)
}
}
If there are multiple gitlab issues missing in a row, the current code will not correctly create placeholder issues. I faked a dummy gitlab setup, only containing gitlab issues #15, #16 and #17 (with issues #1 to #14 being non-existent). The current code will turn the set of gitlab issues into
[ { iid: 1 }, { iid: 15 }, { iid: 3 }, { iid: 16 }, { iid: 5 }, { iid: 17 } ]
I tested it with the following code, where the for loop is exactly the same as on the master branch currently:
When you run this you get:
The text was updated successfully, but these errors were encountered: