Skip to content

Getting details for closing issue fails (issue.iid is undefined)

Checklist

Summary

When the extension tries to fetch details for MR closing issue (happens every 30s), the API call fails because we add undefined to the request.

Screenshot_2022-06-20_at_11.34.27

Steps to reproduce

const minimalIssues = mr ? await gitLabService.getMrClosingIssues(project, mr.iid) : [];
      const issues = (
        await Promise.all(
          minimalIssues.map(mi => gitLabService.getSingleProjectIssue(project, mi.iid)),
        )
      ).filter(notNullOrUndefined);

What is the current bug behavior?

We generate incorrect API calls.

What is the expected correct behavior?

Ignoring closing issue objects that don't contain iid.

Relevant logs and/or screenshots

Possible fixes