hub4j / github-api

Java API for GitHub
https://github-api.kohsuke.org/
MIT License
1.14k stars 727 forks source link

Allow to list workflow runs by head sha and created date #1789

Closed gsmet closed 7 months ago

gsmet commented 8 months ago

Description

This adds additional parameters when looking for workflow runs i.e. head_sha and created. This is very useful when you want to check if some other workflow runs are running for the same head_sha.

See https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-repository for more context.

Partially fixes https://github.com/hub4j/github-api/issues/1783 but I think the other parameters are a lot less useful (at least for now, I have no use of them, I could be convinced to add them if someone asks for them).

@bitwiseman I would highly appreciate if you had the time to push a release once this is in as I'm currently relying on snapshots, which is not ideal. Thanks a lot!

Before submitting a PR:

When creating a PR:

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (be00e51) 80.64% compared to head (4433b11) 80.65%. Report is 3 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1789 +/- ## ============================================ + Coverage 80.64% 80.65% +0.01% - Complexity 2322 2324 +2 ============================================ Files 219 219 Lines 7027 7031 +4 Branches 371 371 ============================================ + Hits 5667 5671 +4 Misses 1128 1128 Partials 232 232 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.