Add the vcs-repository/repositories endpoint request#182
Merged
SimOnPanw merged 2 commits intoPaloAltoNetworks:mainfrom Mar 14, 2025
Merged
Add the vcs-repository/repositories endpoint request#182SimOnPanw merged 2 commits intoPaloAltoNetworks:mainfrom
vcs-repository/repositories endpoint request#182SimOnPanw merged 2 commits intoPaloAltoNetworks:mainfrom
Conversation
vcs-repository/repositories endpoint request
Collaborator
|
👍 Thank you ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The api
code/api/v1/vcs-repository/repositoriesdoes not seem to be supported in the module. This is adding support for this specific request.https://pan.dev/prisma-cloud/api/code/get-vcs-repository-page/
https://github.com/PaloAltoNetworks/pan.dev/blob/39672e2ae8eb3973ff344a0e619f319be373b80c/openapi-specs/code/Repositories.json#L1100
Motivation and Context
Discussion with a coworker to use this request lead to finding this unsupported endpoint. Using this python library is a great way to account for assumptions that can be overlooked when writing scripts from scratch.
My coworker is able to make the request in scripts written from scratch so I saw this as an opportunity to codify the knowledge quickly.
How Has This Been Tested?
Below is the python script I used to try this implementation. It's mostly the 'getting started' script used to demo the library with the new function call added. I built and installed the module from the cloned codebase locally on a Windows computer. Initial tests on the first commit used a GET method and failed with the 500 error but, succeed with a POST method. Other functions work with this script as well which gives me confidence that I have isolated the test case.
I see that it will be good to demonstrate this test in GitHub. I would intend to set this up soon.
Screenshots (if appropriate)
Types of changes
This should be considered a new feature. The api has been available for some time but, this library is not automatically updated with new endpoints. This is a fairly minor change and is unlikely to effect any of the rest of the module.
I suspect there are several endpoints that are also not yet supported and very similar to this one. This is my first contribution to the library so I want to go through the process to be more proficient with further contributions. Researching other missing endpoints may take some time since for this one I was looking for it.
Checklist
I have updated the documentation accordingly.
I have read the CONTRIBUTING document.
I have added tests to cover my changes if appropriate.
All new and existing tests passed.