Skip to content

Changed from getBuilds to getQueries - #1

Open
MaxBuzzer wants to merge 1 commit into
scottdallamura:mainfrom
MaxBuzzer:AntonioRu_getQueries
Open

Changed from getBuilds to getQueries#1
MaxBuzzer wants to merge 1 commit into
scottdallamura:mainfrom
MaxBuzzer:AntonioRu_getQueries

Conversation

@MaxBuzzer

Copy link
Copy Markdown

No description provided.

@MaxBuzzer

Copy link
Copy Markdown
Author

Hi @scottdallamura this is my PR. I basically, replaced your getBuilds sample, with what I think is getQueries, but I'm getting an error on line 41 : Unhandled exception in fetch for 'https://dev.azure.com/antonioru/a7e331d5-b3e7-4c61-ba0b-9303bd7ed8e1/_apis/wit/queries': TypeError: Failed to fetch

@scottdallamura

Copy link
Copy Markdown
Owner

hey, your code looks fine. i suspect the reason it's not working is because this extension isn't allowed to query work items. currently it's only allowed to access builds:

https://github.com/scottdallamura/queue-time-dashboard-widget/blob/main/azure-devops-extension.json#:~:text=%22scopes%22%3A%20%5B%20%22vso.build%22%20%5D%2C

i'm pretty sure you want vso.work

you can see the full list of scopes here: https://learn.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/oauth?toc=%2Fazure%2Fdevops%2Fmarketplace-extensibility%2Ftoc.json&view=azure-devops#scopes

i gather this wasn't apparent from the error message - "Failed to fetch" isn't really helpful. i wonder if it's possible for us to make this a little easier to diagnose. even "Not authorized" would be better...

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

Successfully merging this pull request may close these issues.

2 participants