Add name filter to Repository.get_artifacts()#2459
Add name filter to Repository.get_artifacts()#2459EnricoMi merged 9 commits intoPyGithub:masterfrom trim21:list-artifacts
name filter to Repository.get_artifacts()#2459Conversation
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #2459 +/- ##
=======================================
Coverage 98.68% 98.68%
=======================================
Files 117 117
Lines 11823 11825 +2
=======================================
+ Hits 11668 11670 +2
Misses 155 155
☔ View full report in Codecov by Sentry. |
|
@trim21 can you add a test for this please? |
done |
Repository.get_artifacts() name queryRepository.get_artifacts() name query
tests/Artifact.py
Outdated
| repr(artifact), 'Artifact(name="vscode-codeql-extension", id=10495898)' | ||
| ) | ||
|
|
||
| def testGetArtifactsFromWorkflowWithName(self): |
There was a problem hiding this comment.
Your test name suggests this gets artifacts for a workflow. Given the name, we would expect only a single artifact. That is the reason for my confusion. Test should be renamed:
| def testGetArtifactsFromWorkflowWithName(self): | |
| def testGetArtifactsFromRepoWithName(self): |
There was a problem hiding this comment.
Would you consider to add the name filter to Repository.get_workflow_run(...).get_artifacts as well?
There was a problem hiding this comment.
Maybe later in another PR, not in this one.
There was a problem hiding this comment.
after pyi are merged back to py
Co-authored-by: Enrico Minack <github@enrico.minack.dev>
Co-authored-by: Enrico Minack <github@enrico.minack.dev>
Repository.get_artifacts() name queryname filter to Repository.get_artifacts()
https://docs.github.com/en/rest/actions/artifacts?apiVersion=2022-11-28#list-artifacts-for-a-repository