Get the latest workflow run from GitHub Actions using the Octokit API #25451
-
I’m using the Octokit API to request a specific workflow run. I can see in the documentation that I can request a specific workflow run by providing a workflow run ID. However I would like to always request the latest workflow run. How do I achieve this if I don’t know what the ID will be? E.g. the value of
Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
There should probably be something like:
or similar. This should give you the latest run for given workflow. octokit.github.iooctokit/rest.js |
Beta Was this translation helpful? Give feedback.
-
Thanks heaps for your help! Just posting the code snippet that solved my issue in case this helps anyone in the future.
|
Beta Was this translation helpful? Give feedback.
There should probably be something like:
or similar. This should give you the latest run for given workflow.
octokit.github.iooctokit/rest.js