Parfuemerie-Douglas / scaffolder-backend-module-azure-repositories

A collection of Backstage scaffolder backend modules for Azure repositories.
https://www.npmjs.com/package/@parfuemerie-douglas/scaffolder-backend-module-azure-repositories
Apache License 2.0
10 stars 23 forks source link

Pull request action requires organization name #24

Open jmezach opened 12 months ago

jmezach commented 12 months ago

While testing out these actions I ran into an issue with the azure:repo:pr action. It failed with this rather cryptic error message:

[1]2023-11-10T03:19:35.000Z Beginning step Create a Pull Request to Azure Repo
[2]2023-11-10T03:19:35.000Z TypeError: Cannot read properties of null (reading 'value')
[3]    at <anonymous> (/Users/jmezach/Code/rr/Backstage/node_modules/@antoniobergas/scaffolder-backend-module-azure-repositories/node_modules/azure-devops-node-api/VsoClient.js:124:52)
[4]    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

I managed to fix the issue by passing in the organization parameter, so it seems that that is actually required. But this is not described in the README, nor does it state so in the schema. As also mentioned in #23 I think these actions should maybe accept the output of the RepoPicker directly and then build the appropriate URL's internally.

fosterm-mw commented 11 months ago

This can also be changed in the file to be required so that the error is not as cryptic https://github.com/Parfuemerie-Douglas/scaffolder-backend-module-azure-repositories/blob/main/src/actions/run/pullRequestAzureRepo.ts#L37. As for the output of the RepoPicker, are you interested in opening a PR?