Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
PStoner3 opened this issue Dec 6, 2023 · 3 comments
Open

Comments

@PStoner3
Copy link

PStoner3 commented Dec 6, 2023

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.

@AryPat
Copy link

AryPat commented Dec 21, 2023

Hey @PStoner3! Thanks for reporting an issue! If you would like, you can create a PR to address this.

Otherwise, when I have free time later in the week, I can quickly proceed with your proposed solution.

@PStoner3
Copy link
Author

PStoner3 commented Jan 5, 2024

Sorry for the delay. Yes, I can open a PR. I'll let you know when I do

@PStoner3
Copy link
Author

PStoner3 commented Feb 1, 2024

FYI, PR #46 has been opened and ready for review when you have the time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants