Skip to content
This repository was archived by the owner on Mar 19, 2025. It is now read-only.
This repository was archived by the owner on Mar 19, 2025. It is now read-only.

Non-Existent Repository or Unauthorized Access Causes Program to Fail  #43

@PStoner3

Description

@PStoner3

When analyzing one of my organizations, I ran into a scenario where a repository ID was reported but either didn't exist or I could not access it.

The reported error is

file:///F:/code/nodejs/gh-migration-analyzer/src/api/azureDevOps.js:208
      repo._links.pullRequests.href +
                  ^

TypeError: Cannot read properties of undefined (reading 'pullRequests')
    at getAzureDevOpsRepoPR (file:///F:/code/nodejs/gh-migration-analyzer/src/api/azureDevOps.js:208:19)
    at storeRepositoryPromise (file:///F:/code/nodejs/gh-migration-analyzer/src/api/azureDevOps.js:168:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

I am using the latest pull from the master branch.

A simple fix for this would be to add:

if(repo.name === undefined){
      continue;
}

to the top of the do{}while loop in the getAzureDevOpsRepoPR() method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions