MethodsAndPractices / vsteam

PowerShell module for accessing Azure DevOps Services and Azure DevOps Server (formerly VSTS or TFS)
https://methodsandpractices.github.io/vsteam-docs/
MIT License
442 stars 155 forks source link

Added breaking change warning and new version notification on module load #440

Closed SebastianSchuetze closed 2 years ago

SebastianSchuetze commented 2 years ago

Added notification message if a new version is abailable.

Added warning message for upcoming changes in #438

SebastianSchuetze commented 2 years ago

@DarqueWarrior what do you think of this?

I found a way that is cheaper than checking PS Gallery. We go directly to GitHub and that is fast enough to check on every module load:

image

SebastianSchuetze commented 2 years ago

Also do you think the warning message is enough or should I not add this hard coded?

SebastianSchuetze commented 2 years ago

I just need to find a way that this is not called during unit tests. Seems to stress the rate limit of the GitHub API too much. 😆

DarqueWarrior commented 2 years ago

Have you tried putting this in the psm1 file instead of calling it on every web request that should only be run when the module is loaded.

SebastianSchuetze commented 2 years ago

It is in the psm1 file 🙂. But unit tests seem to load the whole module several times.

But I got an idea. Maybe I offer an option with an environment variable that is checked with boolean.

So people can turn of the warning. And also the update notification.