Skip to content

Instantly share code, notes, and snippets.

@cp-sumi-k
Last active October 10, 2022 11:55
Show Gist options
  • Save cp-sumi-k/1f86c07ab8b7855cd3da4284a92b5e70 to your computer and use it in GitHub Desktop.
Save cp-sumi-k/1f86c07ab8b7855cd3da4284a92b5e70 to your computer and use it in GitHub Desktop.
axios.get('https://api.github.com/repos/OWNER/REPO/actions/runs', config)
.then(res => {
// res contains list of workflows
const workflows = res.data["workflow_runs"].filter(function (workflow) {
return workflow.name == "WorkflowName";
})
// getting id of first workflow
const wID = workflows[0].id
})
.catch(err => {
console.error(err.message)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment