Skip to content
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

Add created and check_suite_id filter for Repository Workflow runs #2891

Merged
merged 6 commits into from Mar 14, 2024

Conversation

treee111
Copy link
Contributor

@treee111 treee111 commented Feb 1, 2024

This PR

This PR adds created and check_suite_id filter, which allows filtering for workflow runs created within the given date-time range and a given Workflow via ID.
For more information on the syntax, see "Understanding the search syntax." API Docs here.

Example usage:

  1. Filtering for workflow runs by created on a repository level (all workflows):
g = Github("access_token")
g.get_repo("PyGithub/PyGithub").get_workflow_runs(created="2022-12-24")
  1. Filtering for workflow runs by created for a specific workflow
g = Github("access_token")
workflow = g.get_repo("PyGithub/PyGithub").get_workflow("ci.yml")
workflow.get_runs(created="2022-12-24")

superseds #2389

@treee111
Copy link
Contributor Author

treee111 commented Feb 1, 2024

@RuneStone0 @msaperst @joshuataylor could you please test if this still works for you!
I rebased onto main and added the second field.

@treee111 treee111 force-pushed the enhance-workflow branch 2 times, most recently from 29b020d to 623e1a8 Compare February 1, 2024 12:13
@msaperst
Copy link

msaperst commented Feb 1, 2024

@RuneStone0 @msaperst @joshuataylor could you please test if this still works for you! I rebased onto main and added the second field.

This works for me

Copy link

@msaperst msaperst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Collaborator

@EnricoMi EnricoMi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@codecov-commenter
Copy link

codecov-commenter commented Mar 14, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 96.71%. Comparing base (0b8435f) to head (ddcc493).

Files Patch % Lines
github/Repository.py 83.33% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2891   +/-   ##
=======================================
  Coverage   96.71%   96.71%           
=======================================
  Files         147      147           
  Lines       14877    14883    +6     
=======================================
+ Hits        14388    14394    +6     
  Misses        489      489           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@EnricoMi EnricoMi merged commit c788985 into PyGithub:main Mar 14, 2024
15 checks passed
@treee111 treee111 deleted the enhance-workflow branch April 19, 2024 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants