-
Notifications
You must be signed in to change notification settings - Fork 42
Conversation
@robinmalik, can you verify the To update it you can run
Additionally please check a code style rules what will be introduced after merging PR #172. |
[ValidateSet('all','created-by-me','assigned-to-me','created_by_me','assigned_to_me')] | ||
[Parameter(ParameterSetName='User')] | ||
[Parameter(ParameterSetName='GroupID')] | ||
[ValidateSet('created-by-me','assigned-to-me','created_by_me','assigned_to_me')] |
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'm not a fan of values with dashes on underscores. IMHO, it should be AssingedToMe, CreatedByMe - they are more "PowerShell kosher".
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 agree with @it-praktyk on the case for validate set. Pascal Case is generally the preferred case for PowerShell.
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 too prefer Pascal Case :) The reason I'd used this was because they matched the actual API values, saving for internal translation within the function (and tab completion is easy enough for the user but I appreciate it might not always be a user doing this!). Happy to change of course!
There is an issue though; Official docs say For versions before 11.0, use the now deprecated created-by-me or assigned-to-me scopes instead.
and I can confirm this is the case for me with version 10.7.3: snake_case doesn't work (yet).
The function thus either needs to ascertain the GitLab version in order to know whether to use snake or kebab case (e.g. created-by-me
or created_by_me
), or we only support kebab case until v11 is released.
Thoughts?
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 think translating would be best. An example from New-GitLabUser.
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.
Or a private function like GetAccessLevel.ps1.
Great stuff. Fix the validate set casing and consider this accepted! |
@it-praktyk - Update-MarkdownHelp -Path .\docs updated all 59 markdown files so I reverted that. @ngetchell thinks there has been a platyps schema update. Maybe best to do all the doc files together in a separate branch? |
Only commit the docs you've worked on. I'll do the grunt work of updating the rest. |
A bug for PlatyPS reported PowerShell/platyPS#371 |
@robinmalik, I've found (I just skimmed it) that in the Syntax section parameter sets are not described correctly (?) Can you check once again? |
This branch is to support querying for GitLab issues with
Get-GitLabIssue
. If deemed ok I can look to expand this portion of the API further.Tested with API version 3 and 4, against GitLab 10.7.3.