-
Notifications
You must be signed in to change notification settings - Fork 0
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
Bugfix: Limited items retrurned from the Get-YTProject function #2
Conversation
KhoiKy
commented
Feb 26, 2025
- Fixed the default limit of projects returned from the Get-YTProject function.
- Fixed Ubuntu job failure.
CHANGELOG.md
Outdated
|
||
## 1.0.0 | ||
|
||
* Created the following basic functions that are used to interact with the API: |
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.
Simplify this sentence to "Created these functions:".
[String[]] $AdditionalField | ||
[String[]] $AdditionalField, | ||
|
||
# Maximum number of results to return. Api end point defaults to top 42. Defaulted to 300 here. |
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.
We should leave this blank so that we return the default number of results that the API returns. and only include the top
query string parameter if this parameter is given. Document in the function's description that the API currently returns 42 results at a time.
@@ -18,7 +18,7 @@ | |||
RootModule = 'YouTrackAutomation.psm1' | |||
|
|||
# Version number of this module. | |||
ModuleVersion = '1.0.0' | |||
ModuleVersion = '1.0.1' |
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.
This is adding functionality, not fixing a bug, so increment to 1.1.0.
448ef0f
to
d2bd829
Compare
|
||
if ($Top) | ||
{ | ||
$endpoint = $endpoint + '&$top=' + "$Top" |
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.
Lint: $endpoint = "${endpoint}&top=${Top}"
.
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.
It needs to be exactly '&$top=' or else it doesn't work correctly. Having that in double quotes will attempt to treat '$top' as a variable.
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.
I didn't see the $
in the query string. Yu can escape it with backtick:
$endpoint = "${endpoint}&`$top=${Top}"
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.
Ahh the backtick, thank you sir!
d2bd829
to
a40e222
Compare