-
Notifications
You must be signed in to change notification settings - Fork 157
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
Update Get-VSTeamRelease cmldet to get release via artifact ids #374
Update Get-VSTeamRelease cmldet to get release via artifact ids #374
Conversation
Hi ya @SebastianSchuetze, @DarqueWarrior I have added a new parameter 'artifactVersionId' to the function 'Get-VSTeamRelease'. I found this helpful as we can retrieve the associated release for a build using buildId(or artifactVersionId). I encountered a scenario where I had to fetch the list of pull requests and get it's associated build and releases, I was able to get the list of builds associated to a pull request but not the direct release associated to that build. Hence tried to achieve this by adding artifactVersionId to the function 'Get-VSTeamRelease'. This is working in my local dev environment and I'm using Windows 2016 Datacenter. Apologies for failing the checks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you can get the unit tests running on the agents then it would be fine. On first sight I can't see why they are not going through.
@SebastianSchuetze there seems to be an issue only in the new test added, I tried to debug it locally and couldn't get through. Would you mind taking a look for me please? Here is the modified version, I haven't pushed it to the repository yet as I'm afraid it may fail too. It 'with build Id should return release as Object' {
## Act
Get-VSTeamRelease -ProjectName VSTeamRelease -artifactVersionId 101
## Assert
Should -Invoke Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
$Uri -eq "https://vsrm.dev.azure.com/test/VSTeamRelease/_apis/release/releases?api-version=$(_getApiVersion Release)&artifactVersionId=101"
}
} |
@hkarthik7 it doesn't matter if it fails or the number commits you to have to do. This is why we have the build. And for the number of commits and the history, we do a squash merge anyways. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @SebastianSchuetze, I have updated the changes. Thank you.
Why was this closed? Did I miss something? |
Hi ya, sorry about that I closed it by mistake. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
PR Summary
Summary is in the comment below.
PR Checklist