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 rerun-failed-jobs for WorkflowRun #2930

Closed
wants to merge 5 commits into from

Conversation

alvicsam
Copy link

GitHub API provides an ability to rerun only failed jobs in a workflow: https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#re-run-failed-jobs-from-a-workflow-run

PR adds rerun_failed_jobs attribute. I also tried to add tests but it seems I need some help with them or a hint how can I fix them.

@alvicsam
Copy link
Author

I tried to fix tests but current approach won't work for rerun-failed-jobs.
As I understood tests are recording json answer from a request to https://api.github.com/repos/PyGithub/PyGithub/actions/runs/<run_number> and then they are looking for a specific URL (for example https://api.github.com/repos/PyGithub/PyGithub/actions/runs/3910280793/rerun). However, url https://api.github.com/repos/PyGithub/PyGithub/actions/runs/3910280793/rerun-failed-jobs exists and works but api doesn't provide it in it's answer.

@codecov-commenter
Copy link

Codecov Report

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

Project coverage is 96.71%. Comparing base (7266e81) to head (2f53329).

Files Patch % Lines
github/WorkflowRun.py 50.00% 5 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2930      +/-   ##
==========================================
- Coverage   96.74%   96.71%   -0.04%     
==========================================
  Files         147      147              
  Lines       14978    14988      +10     
==========================================
+ Hits        14491    14496       +5     
- Misses        487      492       +5     

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

@alvicsam alvicsam closed this May 14, 2024
@alvicsam alvicsam deleted the as-add-rerun branch May 14, 2024 15:23
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

2 participants